ASP.NET: How Do I: Cache an ASP.NET Page Based Upon Information in the HTTP Header

Posted in Frameworks, Companies, Development on April 12, 2009

Get Microsoft Silverlight

In this video Chris Pels shows how to keep a page in the ASP.NET output cache based upon information in the page’s HTTP header. First, the potential HTTP header values are reviewed. Then, a sample page is created and then the OutputCache directive is used with the VaryByHeader attribute which contains a value “accept-language”, an HTTP header, to control caching based upon the language of the user’s browser. The sample page is viewed in IE which is set to English and then in FireFox which is set to use French. Finally, the option to move the cache definition to a CacheProfile in the web.config file is discussed.

Presented by Chris Pels

Date: 26 February 2009

Watch Video Watch Video Watch Video on External Site

Tags: Frameworks, Microsoft, ASP.NET, .NET Framework, Broadcasting, Screencasts, Development, Companies