Article ID: 247404 - Last Review: December 3, 2007 - Revision: 2.6 How to Modify the Cache-Control HTTP Header When You Use IIS
This article was previously published under Q247404 On This PageSUMMARY
Web administrators who use Internet Information Services (IIS) may need to periodically disable the caching of content that changes frequently. This article describes how to set the value of the Cache-Control HTTP Header by using Active Server Pages (ASP), as well as the metabase property CacheControlCustom.
MORE INFORMATION
When you work with content that often changes, you may want to specify what content can be cached and what cannot, and if the client or a proxy server should cache the content. You can specify these options in IIS through the CacheControlCustom property, which can be set for the entire server, a particular Web site, or a specific physical or virtual directory. Setting this property returns HTTP headers that resemble the following:
Commonly-Used HTTP/1.1 Cache-Control Header ValuesThe HTTP/1.1 specification in RFC 2616 defines several values for the Cache-Control header. The following list contains a few of the more common values that are used.
Setting the Cache-Control PropertyThe following examples define different methods for setting this value:For a PageUsing Active Server Pages (ASP), the following ASP code disables caching of a particular page:For a FolderThe following examples set the Cache-Control setting for a folder or virtual directory named "Images" in the default Web site:
REFERENCESFor more information on this topic, please see the following Microsoft Knowledge Base article:247389
(http://support.microsoft.com/kb/247389/EN-US/
)
IIS: How to Disable Caching of Specific MIME Types
In addition, see section 14.9 of the HTTP/1.1 specification in RFC 2616 at the following URL:
RFC 2616
(http://www.w3.org/Protocols/rfc2616/rfc2616.html)
Hypertext Transfer Protocol -- HTTP/1.1 | Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
