jQuery AJAX Calls Not Working In IE8

I recently discovered that some jQuery code I had written for making AJAX calls was not working in IE8, even in Compatibility Mode. Turns out the reason why is that IE8 caches AJAX GET requests. Changing the calls to POST instead of GET corrected the problem. I hope this helps anyone else having this same issue.

Comments

Donny Kurnia said…
You can still using GET, with this workaround:
http://stackoverflow.com/questions/1190318/jquery-ajax-when-periodicaly-called-doesnt-work-on-ie8
Thanks this really helped me out!!
Alan said…
Glad to help!
Alan said…
jQuery's ajax() method has since been updated to automatically append a random number (based on the current timestamp) to ajax calls as long as the cache property is set to false (default).
Unknown said…
Hey ppl,

I found this article, and works as expected.

http://mike-ward.net/blog/post/00660/force-jquery-1-5-to-always-allow-cross-site-scripting

Cheers

Popular posts from this blog

How To Mock Out Child Components In Unit Tests of Angular 2 Code

A Generic Method Using HttpClient to Make a Synchronous Get Request

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception