jQuery AJAX request failing in IE jQuery AJAX request failing in IE json json

jQuery AJAX request failing in IE


Fixed, I changed the content-type from application/json; charset=utf8 to just plain application/json.
I hate IE :)

Also to avoid IE super-caching try this:

var d = new Date();$.ajax({        url:"{{SITE_URL}}/content/twitter.json?_="+d.getTime(), ...Snip...

That way each request is a new url for IE to get :D


For the caching problem why don't you simple use the cache: false parameter?

$.ajax({     url: "yoururl",    cache: false,    ....


is this a copy/paste? the one thing that gets me all the time is leaving the last ',' in an object constructor. that is, most browsers JS accept:

o = { a:1, b:2, c:3, };

but IE chokes on this because the comma after the last item. change it to:

o = { a:1, b:2, c:3 };

and it works.