Why Do AJAX Requests in IE Not Reflect Server-Side Changes?

Today’s head-scratcher was a “feature” of Internet Explorer where it caches similar AJAX requests in the browser. So for example, if you’re pinging a service at a route called /services/status, you’ll very conveniently always get the same response back, unless you specifically modify the request somehow to differentiate it.

If you’re using jQuery, adding cache: false as parameters to your AJAX request return you to more conventional behaviour.

Charles played a huge role in helping me get to the bottom of this one. If you haven’t checked it out yet, and you find yourself doing AJAX, it’s a wonderful tool.

Posted January 12, 2017 at 4:48PM