703. How does Access-Control-Allow-Origin header work? as part of my jQuery ajax call was only part of the solution. I also needed to have the headers returned in the OPTIONS response from my resourceNot the answer youre looking for? Browse other questions tagged jquery ajax session cookies or ask your own question. We are making an ajax request from our main domain to a subdomain (cross-origin) using jQuery. We have CORS set up, and everything is working until we try to send a custom header with the request.Does anyone know why jQuery/browser is not sending the cookies in the second example? Im using jQuerys ajax .get method to retrieve data from my server. Works perfect in Chrome, but in IE9 it is not sending the Cookie header and that breaks the app. Any idea why? Heres the jQuery code Of course using jQuerys .ajax is shorter, easier, well tested, optimised but with this article I think that you saw that the native way of using Ajax ist that hard too. May be this post will be your first step of creating your own library. Sending Request Headers via jQuery AJAX. the server can even respond with a signed cookie to handle session state and make the user go through a login screen from Im not sure what to do with the Set-Cookie header.