October 2010
Intermediate to advanced
1920 pages
73h 55m
English
Another option is to use the VaryByHeader attribute to create different cached versions of a page when the value of a particular browser header changes. Several standard browser headers are transmitted with each page request, including
• Accept-Language—
Represents a prioritized list of languages that represent the preferred human language of the user making the request.
• User-Agent—
Represents the type of device making the request.
• Cookie—
Represents the browser cookies created in the current domain.
For example, the page in Listing 29.5 includes an <%@ OutputCache %> directive that has a VaryByHeader attribute with the value User-Agent. When you request the page with different browsers, different versions ...
Read now
Unlock full access