clientCache Element for staticContent [IIS Settings Schema]
Note
For more information about the clientCache element, see the following topic on the Microsoft IIS.net Web site: Client Cache <clientCache>.
Specifies settings for caching static content that is sent to the client.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cacheControlCustom |
Optional string attribute. Specifies custom HTTP 1.1 cache control directives. Multiple directives can be specified if they are separated by carriage return/line feed (CRLF) pairs. |
||||||||||
cacheControlMaxAge |
Optional timeSpan attribute. Specifies the maximum age (in seconds) of the cache control value. The default value is 1.00:00:00 (1 day). |
||||||||||
cacheControlMode |
Optional enum attribute. Specifies the mode to use for client caching. The cacheControlMode attribute can be one of the following possible values. The default is NoControl.
|
||||||||||
httpExpires |
Optional string attribute. Specifies, in Request for Comments (RFC) 1123 format, the date and time after which a page that is cached on the client is considered stale. The value is returned to the browser in the HTML file header. The user agent compares the given value with the current date to determine whether to display a cached page or to request an updated page from the server. Note For more information on date and time formats, see RFC 1123, "Requirements for Internet Hosts -- Application and Support." For more information on header fields, see Request for Comments (RFC) 2616, "Hypertext Transfer Protocol -- HTTP/1.1." |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the top-level section group (in ApplicationHost.config) in which this element is defined. |
staticContent |
Configures static file request handler settings. |
Remarks
For more information about the clientCache element, see the following topic on the Microsoft IIS.net Web site: Client Cache <clientCache>.
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root application Web.config Application Web.config Directory Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |