books
Free Books / Computers / Practical mod_perl /

previous page: 16.3. Content Negotiation
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 16.4. HTTP Requests

16.3.1. The Vary Header




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

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

Books by Stas Bekman:















TOP
previous page: 16.3. Content Negotiation
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 16.4. HTTP Requests

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

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

© 2007-2021 StasoSphere.com