
Types of Negotiation
Although we have concentrated on language negotiation, similar mechanisms work for
other types of content negotiation, though normally without using user preferences:
Media type negotiation
You can make the same information available, for example, as plain text, in PDF
format, and in HTML format. You could then use the type‑map mechanism of
Apache for language negotiation, and use different Content-Type headers. The
browser is expected to list its media type preferences in an Accept header. This is
not very useful in most cases, since browsers often express such preferences in a
manner that contains too little information or cannot be trusted in practice.
Encoding negotiation
Similarly, you can make the same information available in different character en-
codings. Using the type-map mechanism for example, the Content-Type headers in
your definition file would contain charset parameters that indicate the encoding
of each version. The browser is expected to list its encoding preferences in an
Accept-Charset header. However, many popular browsers do not send such a
header at all, which means that they accept any encoding.
Transfer encoding negotiation
Additional transfer encoding (see Chapter 6) can be agreed upon between the
browser and the server. A browser uses Accept-Encoding to specify the transfer
encodings it can handle. Figure 10-9 shows