Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery AJAX request in IE9 not sending Cookie header

I'm using jQuery's 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? Here's the jQuery code:

$.get(this.server + 'rest/photo/' + this.profileId + '/count', function(data) {
    $('#imageCount').html(data);
});
like image 465
at. Avatar asked Nov 14 '22 22:11

at.


1 Answers

I have the same problem here, I can't get the jQuery .ajax() function to work. The only workaround I found is this:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> 

You can add this meta tag to the top of the page to get it working. But it doesn't feel like a good solution. I think the problem is that the xmlhttprequest object in IE9 is different, so jQuery cannot find the respective object, therefore ajax is not triggering.

like image 132
Alcatraz Avatar answered Dec 22 '22 04:12

Alcatraz