Iis – Unusual Caching Issue with IE 7/8 and IIS 7

cachehttpiisinternet explorer

We recently moved a site into production running Server 2008 x64 and IIS 7. The ASP.NET pages apparently load just fine, but when it comes to IE 7 and 8, a weird caching issue has cropped up with the CSS and JavaScript files on the page.

On a very sporadic schedule, IE does not get all the files necessary to compose the page (i.e. CSS and JS files). When I manually go to the missing files from the address bar, they come back from local cache as empty. I F5 these source files and magically they come down properly. I refresh the site after loading a few files and the cache seems to hold.

This problem has only been reproduced (again, sporadically) on IE 7 and 8 running XP. Chrome and Firefox appear to be immune.

We have set IIS to use server-side kernel caching for CSS, JS and images. We also have set to expire content for the App_Themes and Scripts directories to expire immediately. One initial thought it was a SWF loading an FLV on page load. These fixes have not remedied the problem.

We had no problems on our staging server which is using Server 2003 and IIS 6.

Any ideas would be greatly appreciated.

P.S. It sounds similar to this problem: but we do have the Static Content module installed.
IIS: Content-Length 0 for CSS, Javascript and Images

Best Answer

One consideration may be file structure corruption where the cache is residing, since type/family of browsers will typically setup their own cache areas on the file system. You might try redefining the cache to a different location or checking the file system for difficulties (chkdsk).