How to avoid AJAX caching in Internet Explorer 11 when additional query string parameters or using POST are not an option How to avoid AJAX caching in Internet Explorer 11 when additional query string parameters or using POST are not an option ajax ajax

How to avoid AJAX caching in Internet Explorer 11 when additional query string parameters or using POST are not an option


Caching is normally controlled through setting headers on the content when it is returned by the server. If you're already doing that and IE is ignoring them and caching anyway, the only way to get around it would be to use one of the cache busting techniques mentioned in your question. In the case of an API, it would likely be better to make sure you are using proper cache headers before attempting any of the cache busting techniques.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ

Cache-control: no-cacheCache-control: no-storePragma: no-cacheExpires: 0


If you don't control the API, you might be able to disable IE caching by adding request headers on the ajax gets:

'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0'