Content Expiration

Sometimes your website will have time-sensitive content that is updated frequently, such as the latest football scores on a sports site. In this case, it’s not useful for web browsers to cache such content because the next time users access the site, the content will be changed and will have to be downloaded anew. Content expiration is a feature of IIS that allows you to specify to the client when content should expire on the server. This works by caching the page the first time the browser visits it, and, the next time the browser visits the page, comparing the timestamp on the cached page to the content expiration information received from the server in the HTTP headers. If the content has passed its expiration date or time interval, the page is requested anew; otherwise, the page is fetched from the cache.

You can configure content expiration at the site, virtual directory, or file level. For example, to configure content expiration for a page named realtimescores.asp in your Default Web Site, open the properties sheet for the site and select the HTTP Headers tab. Select the check box to enable content expiration, and choose the Expire Immediately option for a page that dynamically displays the latest sports scores (Figure 16-16). Other options include defining a specific date when content on the page expires or a specific time interval in days, minutes, or hours until expiration.

click to expand
Figure 16-16: Configuring content expiration




IIS 6 Administration
IIS 6 Administration
ISBN: 0072194855
EAN: 2147483647
Year: 2003
Pages: 131
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net