Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a developer having what should be a relatively simple problem in IIS 7 on Windows Server 2008 R2. The problem is that IIS 7 is overzealously caching all static content on the server. It's caching all .html and .js content and not noticing when the content changes on disk unless I iisreset.

I've tried the following:

  1. Deleting the local cache in my browser (I'm 99% positive this is a server caching issue)
  2. In IIS Admin in OutputCaching adding an .html extension and unchecking "User mode caching" and unchecking "Kernel-mode caching"
  3. In IIS Admin in OutputCaching adding an .html extension and checking "User mode caching" and selecting the radio for "Prevent all caching"
  4. In IIS Admin editing Output Cache Feature settings and unchecking "Enable cache" and "Enable kernel cache under OutputCaching.
  5. Running "C:\Windows\System32\inetsrv\config\appcmd set config "SharePoint - 80" -section: system.webServer/caching -enabled:false"
  6. Looking through applicationHost.config and disabling anything related to caching I could find.

Nothing seems to work. I'm getting very frustrated. Can anyone please help?

share|improve this question
DId you manage to find a solution. I'm facing the same problem. Tried everything and I just can't disable caching. Only way is to change the filename of the file, make a request and then change back. – Tivie Nov 14 '13 at 1:23

I would really like to see system.webServer/caching section from your applicationhost.config and web.config. Please paste them if you can. By running the above appcmd command, you have just disabled User mode caching you still have Kernel caching enabled. Also, if you really want to disable caching at the Web site or server level, just change the following:

    <caching enabled="false" enableKernelCache="false" />

You can also use Fiddler tools to verify if the content is really cached i.e. if it's returning you 304.

share|improve this answer

On the server, if you run 'netsh http show cache', do you see any cached entries? If so, then you have not successfully disabled Output Caching on the web server.

share|improve this answer

And just a $0.02 to check that your handlers are the handlers you expect them to be.

Static files are typically served by the static file handler. If you've done crazy stuff like create a wildcard script map, or register a module for all file types and verbs...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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