System.Web Namespace HttpCachePolicy Class
Appends the specified text to the Cache-Control HTTP header.
[ VB ]
Public Sub AppendCacheExtension ( _
ByVal extension As String _
)
[ C# ]
public void AppendCacheExtension (
string extension
);
[ C++ ]
public: void AppendCacheExtension (
String* extension
);
[ JScript ]
public function AppendCacheExtension (
extension : String
);
- extension
- The text to append to the Cache-Control header.
Exception Type |
Condition |
ArgumentNullException |
Occurs when extension is a null reference ( Nothing in Visual Basic ). |
If the browser does not recognize cache control directives or extensions, the browser must ignore the unrecognized terms. For more information, see the document RFC 2616: Hypertext Transfer Protocol - HTTP/1.1, available on the World Wide Web Consortium's site at http://www.w3c.org .
[ VB, C#, JScript ] In the following example, which illustrates the use of a chche-control extension supported by Internet Explorer, the server is indicating to the browser that the content will not change for one hour ( pre-check=3600 ) and instructs it to retrieve the content directly from the local cache. However, if the content is modified by the server and the page is requested by the user within a fifteen-minute ( post-check= 900 ) to one-hour period, the browser displays the information found in the local cache but also performs a background check and optional fetch of the new content on the server.
[ VB ]
Response.Cache.AppendCacheExtension ( "post-check=900,pre-check=3600" )
[ C# ]
Response.Cache.AppendCacheExtension ( "post-check=900,pre-check=3600" );
[ JScript ]
Response.Cache.AppendCacheExtension ( "post-check=900,pre-check=3600" )
HttpCachePolicy Members Caching ASP.NET Pages