1.10. The Web

The Web is the exchange of HTML data under the protocol HTTP ("Hypertext Transfer Protocol"). Version 1.1 of this protocol is described in RFC 2616 of 1999. Browsers and servers communicate through this protocol by sending each other messages that may or may not contain HTML data. Thus, when one types a URL followed by a carriage return in the appropriate area in the browser, the browser sends an HTTP request to the server in question. The server replies by sending the HTML data corresponding to the URL, or with an error message. In all three cases (request, transmission of HTML data, error message), the parties to the communication send each other messages through HTTP.

HTTP is based on three concepts: the encoding (called charset), which by default is ISO 8859-1 (and not ASCII); the type of compression to be applied (called content-coding, whose values may be gzip, compress, zlib, or identity); and the "transfer coding" to be used. The transfer coding corresponds to the "quoted-printable" and "base 64" of MIME, except that here data transfer is binary and thus does not require conversion to ASCII. The "transfer coding" that we use is chunk, which means that the data will be divided into blocks of a fixed length.

Here is an example of an HTTP header for a message in ISO 8859-1 with gzip compression:

Content-Type: text/html; charset=iso--
       Content-Encoding: gzip
       Transfer-coding: chunked

where the first line specifies that the MIME type of the following document ...

Get Fonts & Encodings 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.