Microsoft KB Archive/313561

= HOW TO: Set HTTP Headers for Content Expiration in Internet Information Services (IIS) 5.0 =

Article ID: 313561

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q313561



IN THIS TASK
SUMMARY
 * How to Set HTTP Headers for Content Expiration

REFERENCES



SUMMARY
This step-by-step article describes how to set the expiration of Web site content in Internet Information Services (IIS) 5.0.

If your Web site contains time-sensitive information, such as special offers or event announcements, you can configure settings to ensure that information that is no longer valid is not published. When you establish content expiration, you can configure site content to automatically expire any time.

When you enable the content expiration feature, IIS includes the expiration information in the Hypertext Transport Protocol (HTTP) header of the Web page that is sent to the Web browser. The browser then compares the current date with the expiration date to determine whether to display a locally cached page, or request an updated page from the server.

You can set content expiration for Web sites, for virtual folders, or for individual files. Site-level settings apply to all content in that site, folder-level settings apply to all folders and files in that folder, and file-level settings apply to an individual file.

back to the top

How to Set HTTP Headers for Content Expiration
To set content expiration for a Web site, for a virtual folder, or for a file:
 * 1) Start Internet Services Manager, or open the MMC that contains the IIS snap-in.
 * 2) In the Internet Information Services dialog box, click to expand *  , where   is the name of the server.
 * 3) Right-click the Web site, folder, or file for which you want to set content expiration (for example, click Default Web Site), and then click Properties.
 * 4) Click the HTTP Headers tab.
 * 5) Click to select the Enable Content Expiration check box.
 * 6) In the Content should box, perform one of the following steps:
 * 7) * Click Expire Immediately.

Use this option if you want Web content to expire immediately. The browser does not display the page from the local cache. It requests and displays the latest version of the page from the server.

-or-
 * 1) * Click Expire after, and then specify a period of time (in minutes, hours, or days) after the content that expires in the appropriate boxes.

Use this option if you want Web content to expire after a specific length of time.

-or-
 * 1) * Click Expire on, and then click an expiration date and time in the appropriate boxes.

Use this option when you want Web content to expire after a specific date and time.
 * 1) Click OK, and then quit Internet Services Manager, or close the IIS snap-in.