When I call a URL via AJAX, which cookies does it read? Same goes for sessions.
Who actually runs the thread? Is it my default system browser, current one, some other entity?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
This can be confusing, since it all happens ‘behind the scenes’. I found that, like any other Javascript, the browser loading the page is the one to run the AJAX code. Moreover – the same instance of the browser, meaning sessions can be used as well.
I’ve run a bit of code to come to this conclusion. The following examples are in classic ASP.
Firstly, I have one file which writes these variables:
Next, one file to read them (and display result):
At last, one file to AJAXly call them:
Running the first file on one browser and the last on a few, the first one shows:
The rest display:
So there you have it 🙂