I'm developing a dynamic web application (running on IIS7), it works fine in all the major browsers, except IE9. It seems, that it caches practically everything, and that leads to quite many problems, like
- Often changing contents remain unchanged
- User visits an authorized content, then signs out, then tries to go back to the secured content and gets it from cache!
I've tried disabling cache with
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
but no luck so far...
I've just come across this in an MVC development.
I wanted to disable caching of all AJAX requests server side.
To do this I registered the following global filter.
Try
Also, required reading: http://support.microsoft.com/kb/234067
Are you making heavy use of AJAX? Make sure each AJAX request is unique, otherwise IE9 will serve up a cached version of the request response.
For example, if your AJAX request URL normally looks like: http://www.mysite.com/ajax.php?species=dog&name=fido
Instead, add a unique value to each request so IE doesn't just use the cached response. The easiest way to do that in Javascript is a variable that increments each time you make a request: