HTML and CSS Reference
In-Depth Information
The format of the mixed-replace HTTP header is very similar to its mul-
tipart/mixed counterpart; the only difference is in the Content-Type :
multipart/x-mixed-replace;boundary=SomeRandomString
All other rules regarding the format of the multipart content are the
same, including the boundary string used to separate the parts and the
individual Content-Type fields for each part of the content.
13.3.3. Exploiting Multipart Documents
It is easy to see how you can use the two special MIME multipart content
types to create server-push dynamic documents. By delaying the time
between parts, you might create an automatically scrolling message in
the Mozilla browser window. Or by replacing portions of the document
through the x-mixed-replace MIME type, you might include a dynamic
billboard in your document, or perhaps even animation.
Note that server-push multipart documents need not apply only to HTML
or other plain-text documents. Images, too, are a MIME-encoded con-
tent type, so you can have the HTTP server transmit several images in
sequence as parts of a multipart transmission. Because you may also
have each new image replace the previous one, the result is crude anim-
ation. Done correctly, over a network of sufficient bandwidth, the effect
can be quite satisfying.
13.3.3.1. Efficiency considerations
Server-push documents maintain a connection between the client and
server for the duration of the dynamic document's activity. For some
servers, this may consume extra network resources and may also re-
quire that several processes remain active, servicing the open connec-
tion. Make sure the server-push process (and, hence, the client/server
connection) expires upon completion or after some idle period. Other-
 
Search WWH ::




Custom Search