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

  • SEARCH
  • Home
  • 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 8614647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:10:11+00:00 2026-06-12T05:10:11+00:00

When I call a URL via AJAX, which cookies does it read? Same goes

  • 0

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?

  • 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-12T05:10:13+00:00Added an answer on June 12, 2026 at 5:10 am

    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:

    Response.Cookies("testing") = "One, Two, Three"
    Session("testing") = "Forty One, Forty Two, Forty Three"
    

    Next, one file to read them (and display result):

    Cookie is: 
    <%
    Response.Write Request.Cookies("testing")
    %>
    <br>
    Session is:
    <%
    Response.Write Session("testing")
    %>
    

    At last, one file to AJAXly call them:

    <div id="result"></div>
    <script type="text/javascript">
    //Different browsers initiate ajax differently
    try {var oXH = eval("new Active"+"X"+"Object('MSXML2.XMLHTTP')");}
    catch(e) {var oXH = new XMLHttpRequest();}
    
    //Call page that reads the cookie
    oXH.open("GET","/testCookie.asp",true);
    oXH.onreadystatechange = function(){
        if ((oXH.readyState != 4)||(oXH.status != 200))
            return true;
        else
        {
            document.getElementById("result").innerHTML = oXH.responseText;
        }
    };
    oXH.send(null);
    </script>
    

    Running the first file on one browser and the last on a few, the first one shows:

    Cookie is: One, Two, Three
    Session is: Forty One, Forty Two, Forty Three
    

    The rest display:

    Cookie is:
    Session is:
    

    So there you have it 🙂

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

Sidebar

Related Questions

I have a DIV which is written via an ajax call to a perl
I have a dropdown list which is populated via a jquery ajax call when
I have a simple form which updates values in the db via ajax call
I have a form which I call via AJAX (for use on a CMS)
I have a partial view which is returned via an Ajax call with a
AJAX Call $.ajax({ url: '/api/Inventory', cache: false, type: 'POST', data: json, contentType: 'application/json, charset=utf-8',
Here's my ajax call: $.ajax({ url: 'url-to-json', type: 'POST', dataType: 'json', cache: 'false', data:
i have an ajax call $.ajax({ url: '<%=Url.Action(SaveDetails,Survey) %>', dataType: 'JSON', cache: false, data:
I want to do an AJAX call via jQuery load() and only once it
I have an ajax call bound to a link via jQuery, and I want

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.