You are previewing HTTP: The Definitive Guide.

HTTP: The Definitive Guide

Cover of HTTP: The Definitive Guide by David Gourley... Published by O'Reilly Media, Inc.


We have discussed in some detail the mechanism by which clients and servers can choose between a set of documents for a URL and send the one that best matches the client's needs. These mechanisms rely on the presence of documents that match the client's needs—whether they match the needs perfectly or not so well.

What happens, however, when a server does not have a document that matches the client's needs at all? The server may have to respond with an error, but theoretically, the server may be able to transform one of its existing documents into something that the client can use. This option is called transcoding.

Table 17-4 lists some hypothetical transcodings.

Table 17-4. Hypothetical transcodings



HTML document

WML document

High-resolution image

Low-resolution image

Image in 64K colors

Black-and-white image

Complex page with frames

Simple text page without frames or images

HTML page with Java applets

HTML page without Java applets

Page with ads

Page with ads removed

There are three categories of transcoding: format conversion, information synthesis, and content injection.

Format Conversion

Format conversion is the transformation of data from one format to another to make it viewable by a client. A wireless device seeking to access a document typically viewed by a desktop client may be able do so with an HTML-to-WML conversion. A client accessing a web page over a slow link that is not very interested in high-resolution images may be able ...

The best content for your career. Discover unlimited learning on demand for around $1/day.