Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Session Cookies on Internet Explorer 9 AJAX requests

Internet Explorer 9 is not sending session cookies with my AJAX requests.

When I issue an authentication request to my API via AJAX, it returns a response that sets a session cookie. Subsequent calls to the API via AJAX do not send the cookie back to the server.

The API is located on the same host. Similarly, regular non-AJAX page requests also do not show the session cookie. I turned off all privacy and security settings in Internet Options. Chrome sends the cookies properly.

How do I get IE to return the cookies? Thanks!

like image 345
Not Specified Avatar asked Nov 12 '12 20:11

Not Specified


People also ask

Do AJAX requests include cookies?

Basically, ajax request as well as synchronous request sends your document cookies automatically.

How do I view sessions in Internet Explorer?

To check local and session storage in Internet Explorer 11 (IE11) and Microsoft Edge you must press F12 button on your keyboard, and switch tab to “CONSOLE”.


1 Answers

The URL I was attempting to access used an underscore character ('_'). This is an invalid URL and so Internet Explorer does not accept the cookies properly. Fixing this solved my instance of the problem.

like image 154
Not Specified Avatar answered Nov 14 '22 00:11

Not Specified