Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:01:33+00:00 2026-06-04T13:01:33+00:00

To better illustrate my problem , the question could be: Can I initiate a

  • 0

To better illustrate my problem , the question could be:

Can I initiate a session from a JSONP request?

In more detail: Suppose a JSONP request is made from my browser to myserver.com. Can myserver.com set cookies through the JSONP response, so that later on, when requests are again made to myserver.com (either directly when doc.host = myserver.com or indirectly through another JSONP request from an arbitrary doc.host) those cookies will be sent to it? Currently the browser seems to ignore the cookies I send with JSONP responses.
Is what I want possible? What am I missing here?

EDIT: This is the request I do , by loading a local js file through a dummy local html that just fetches latest jquery and loads the js file:

$.ajax({
  url: "http://my-remote-server/jsonp/service/test",
  dataType: 'jsonp',
  data: {some:'data'},
  success:   function(responseData)
            {console.log(responseData);}
    });

The response of the above JSONP request, is setting a cookie. This is confirmed since chrome reports it.
Problem is that if I just re-execute the above a second time, the cookie previously set isnt sent back to the server .

EDIT 2: I went to Chrome cookie browser (in the under-the-hood page) and I cant find the cookie, although it is reported (debug console of chrome) as received in the JSONP response. Which means that server sends it, browser sees it and then throws it away.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:01:35+00:00Added an answer on June 4, 2026 at 1:01 pm

    I found the solution, and here is some info that might be interesting for anyone dealing with this problem:

    From wikipedia definition:

    Third-party cookies are cookies being set with different domains from the one shown on the address bar

    If I am not wrong, this makes 99.99% of all JSONP set cookies, third-party cookies. And in my case the address shown on the address bar is a file:// ,which makes my cookie a third party one.

    As soon as I enabled third party cookies it worked.

    As a side note, Chrome by default does not support cookies on file:// pages and doean not warn or notifies this. It has created some headaches .See here and here for the details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've simplified my problem and created this example to better illustrate. My table: CREATE
I've added the following image to help illustrate the problem better: Hi, I'm looking
UPDATED I've updated the example to better illustrate my problem. I realised it was
I have a problem to solve from SPOJ -like platform and I can't come
Better to give an example, to illustrate what i am describing. The div element
Is there a better solution to the problem of looking up multiple known IDs
Is there a better way than using globals to get interesting values from a
My question is sort of a follow on from this question below but I
To solve a problem (and better my understanding of multitasking) I have written a
I've written this small test class just to illustrate my problem When working with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.