When you want Web site content to expire automatically such that no obsolete information is cached at the proxy or Web browsers you configure Content expiration in IIS at the Web site level.
In IIS 6.0
- Right click on Web Site (Default Web Site in our case) and click on Properties
- Under HTTP Headers tab you can check Enable content expiration
In IIS 7 / 7.5
- Click on the Web Site (Default Web Site in our case)
- In the Features View, double click HTTP Response Headers
- Click on Set Common Headers… in Actions panel
or Right click in the HTTP Response Headers Feature Page and click Set Common Headers… - You can check Expire Web content: to enable content expiration
NOTE: In IIS_schema.xml, under system.webServer/staticContent under clientCache
Example:
I have enabled Expire Web content and set it to Immediately. You will see the following in the webServer setting in the web.config of the Web site.
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</configuration>
Hope this helps,
Vivek Kumbhar
Quote of the day:
Consistency requires you to be as ignorant today as you were a year ago. - Bernard Berenson