asp.net.ph

HttpCachePolicy.AppendCacheExtension Method

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
);

Parameters

extension
The text to append to the Cache-Control header.

Exceptions


Exception Type Condition
ArgumentNullException Occurs when extension is a null reference ( Nothing in Visual Basic ).

Remarks

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 .

Example

[ 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" )
See Also

HttpCachePolicy Members   Caching ASP.NET Pages Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph