Disable static content caching in IIS 7

Posted by Lee Richardson on Server Fault See other posts from Server Fault or by Lee Richardson
Published on 2010-03-27T17:39:35Z Indexed on 2010/03/27 17:43 UTC
Read the original article Hit count: 828

Filed under:

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?

© Server Fault or respective owner

Related posts about iis7