Practical mod_perl / HTML Book /



previous page: 16.3. Content Negotiation
  
page up: HTML Version of the book
  
next page: 16.4. HTTP Requests

16.3.1. The Vary Header


To signal to the recipient that content negotiation has been used to determine the best available representation for a given request, the server must include a Vary header. This tells the recipient which request headers have been used to determine the representation that is used. So an answer may be generated like this:

$r->header_out('Vary', join ", ", 
               qw(accept accept-language accept-encoding user-agent));

The header of a very cool page may greet the user with something like this:

Hallo Harri, Dein NutScrape versteht zwar PNG aber leider kein GZIP.

However, this header has the side effect of being expensive for a caching proxy. As of this writing, Squid (Version 2.3.STABLE4) does not cache resources that come with a Vary header at all. So without a clever workaround, the Squid accelerator is of no use for these documents.

 

Continue to:

  • prev: 16.3. Content Negotiation
  • Table of Contents
  • next: 16.4. HTTP Requests







TOP
previous page: 16.3. Content Negotiation
  
page up: HTML Version of the book
  
next page: 16.4. HTTP Requests


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com