Internet Explorer Caches Ajax Requests
Last night I was putting some final touches on an app I am developing and I ran into some issues in IE8. When I used jQuery’s $.get() to pull some content off the server it triggered the success function without ever requesting the page from the server. I was a little confused at first, but after I used the right keywords I was able to figure out that IE8, and probably IE7, cache ‘get’ requests. It seems like there are two workarounds that are pretty common: switch to post, this is what I did, or add a random number as a URL variable. I didn’t care if my request was get or post, so I just made the switch.
After that all was good, again.
- Beyond HTML
Made by Symmetric Web
Distributed by Smashing Magazine
No comments yet!