HTML and CSS Reference
In-Depth Information
13.3. Server-Push Documents
Netscape invented server-push dynamic documents. With the techno-
logy, the client/server connection remains open after an initial transfer of
data, and the server periodically sends new data to the client, updating
the document's display. Server-push is made possible by some special
programming on the server side and is enabled by the multipart/mixed-
media type feature of Multipurpose Internet Mail Extensions (MIME), the
computer industry's standard for multimedia document transmission over
the Internet.
13.3.1. The Multipart/Mixed Media Type
As we mentioned earlier in this chapter in the discussion of client-pull
dynamic documents, the HTTP server sends a two-part transmission to
the client browser: a header describing the document, followed by the
document itself. The document's MIME type is part of the HTTP header
field. Normally, the server includes "Content-Type: text/html" in an HTML
document's header before sending its actual contents. By changing that
content type to "multipart/mixed," you can send an HTML document or
several documents in several pieces, rather than in a single chunk. Only
Mozilla-based browsers, such as Netscape and Firefox, though, under-
stand and respond to the multipart header field; other browsers either
ignore additional parts or refuse the document altogether.
The general form of the MIME multipart/mixed-media Content-Type head-
er looks like this:
Content-type: multipart/mixed;boundary="SomeRandomString"
This HTTP header component tells the Mozilla client to expect the doc-
ument to follow in several parts and to look for SomeRandomString , which
separates the parts. That boundary string should be unique and should
not appear anywhere, in any of the individual parts. The content of the
server-to-client transmission looks like this:
 
Search WWH ::




Custom Search