Transcoding
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
Before |
After |
---|---|
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 ...
Get HTTP: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.