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


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).


This can be fixed by following

Go the web site under IIS, click on Output Caching, select aspx pages, select the Radio Button "Prevent All caching"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.