Server -Push Documents

Server-push dynamic documents are driven from the server side. 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.

Server-push documents currently are not supported by Internet Explorer.

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 Netscape, though, understands and responds 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 header looks like this:

Content-type: multipart/mixed;boundary="SomeRandomString"

This HTTP ...

Get HTML & XHTML: The Definitive Guide, 5th Edition 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.