ASP.NET, IS7 and IE8 caching?
Posted
by
jdege
on Server Fault
See other posts from Server Fault
or by jdege
Published on 2012-04-11T23:09:21Z
Indexed on
2012/04/11
23:32 UTC
Read the original article
Hit count: 172
We're suddenly having problems with some of our sites having old versions of .css and .js files show up in the browser. Generally, these problems go away, when the user clears cache in the browser.
Is there something we can do either in the code or in IIS7, to convince the browser to not used the cached files?
In our weirdest case, we have one customer whose users hit our site, and get an old version of a js file. They clear cache, load the page, get the current version, and the page runs fine. Then they load the file again, and suddenly have the old version, again.
Any ideas as to how that might be happening? I can think of three:
- The browser is somehow holding on to the old version, when we clear cache, and is putting it back in the cache, before the second page load.
- One of our servers has an old version of the file, and while the first page load after a clear cache pulls it from one of the servers with the current version, second and subsequent page loads pull it from the server that has the old version.
- The first load after a clear cache goes straight to our servers, while subsequent loads pull the file from the cache on the customer's web proxy.
I have to say, all three of those scenarios seem outlandishly unlikely, but it's a repeatable behavior.
Any ideas?
© Server Fault or respective owner