2
votes

I'm doing a research on how IIS static content caching works and the more I read the more confused I get.

According to the offical site:

IIS automatically caches static content (such as HTML pages, images, and style sheets), since these types of content do not change from request to request. IIS also detects changes to the files when you make updates, and IIS flushes the cache as needed.

(http://www.iis.net/learn/manage/managing-performance-settings/configure-iis-7-output-caching)

However, I keep finding articles about how to enable static content caching for iis like this: http://www.galcho.com/Blog/post/2008/02/27/IIS7-How-to-set-cache-control-for-static-content.aspx

So does iis cache by default or not? Am I maybe confusing client-side and server-side caching? Or are articles like these are outdated?

1

1 Answers

3
votes

It is true that IIS caches all the static content by default. The definition of the type of files to be considered as static is defined in the applicationHost.config under the staticContent section. If you want to override the policy or add additional type for caching, then you would need to add/change the Caching/Profiles section