Practical mod_perl / HTML Book /



previous page: 16.2.3. Entity Tags
  
page up: HTML Version of the book
  
next page: 16.3.1. The Vary Header

16.3. Content Negotiation


Content negotiation is a wonderful feature that was introduced with HTTP/1.1. Unfortunately it is not yet widely supported. Probably the most popular usage scenario for content negotiation is language negotiation for multilingual sites. Users specify in their browsers' preferences the languages they can read and order them according to their ability. When the browser sends a request to the server, among the headers it sends it also includes an Accept-Language header. The server uses the Accept-Language header to determine which of the available representations of the document best fits the user's preferences. But content negotiation is not limited to language. Quoting the specification:

HTTP/1.1 includes the following request-header fields for enabling server-driven 
negotiation through description of user agent capabilities and user preferences: 
Accept (section 14.1), Accept-Charset (section 14.2), Accept-Encoding (section 14.3), 
Accept-Language (section 14.4), and User-Agent (section 14.43). However, an origin 
server is not limited to these dimensions and MAY vary the response based on any 
aspect of the request, including information outside the request-header fields or 
within extension header fields not defined by this specification.

 

Continue to:

  • prev: 16.2.3. Entity Tags
  • Table of Contents
  • next: 16.3.1. The Vary Header







TOP
previous page: 16.2.3. Entity Tags
  
page up: HTML Version of the book
  
next page: 16.3.1. The Vary Header


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