Section 13.1. An Overview of Dynamic Documents


13.1. An Overview of Dynamic Documents

Recall from our discussion in Chapter 1 that the client browser initiates data flow on the Web by contacting a server with a document request. The server honors the request by sending the document to the client. The client subsequently displays the document's contents to the user . For normal web documents, a single transaction initiated from the client side is all that is needed to collect and display the document. Once displayed, however, it does not change.

Dynamic documents, on the other hand, are the result of multiple transactions initiated from either or both the server side and the client side. A client-pull document is one that initiates multiple transactions from the client side. When the server is the instigator, the dynamic document is known as a server-push document.

In a client-pull document, special HTML codes tell the client to periodically request and download another document from one or more servers on the network, dynamically updating the display.

Server-push documents also advance the way servers communicate with clients . Normally, over the Web, the client stays connected with a server for only as long as it takes to retrieve a single document. With server-push documents, the connection remains open and the server continues to send data to the client periodically, adding to or replacing the previous contents.

Mozilla-based browsers, including Firefox and Netscape, currently are the only browsers able to handle HTTP server-push dynamic documents natively. And because server-push documents don't work without an HTTP server, you can't develop and test them unless you have a server running locally as well.

13.1.1. Another Word of Caution

As always, we tell you exactly how to use these exciting but nonstandard features, and we admonish you not to use them unless you have a compelling and overriding reason to do so. We are particularly strident with that admonition for dynamic documents, not only because they aren't part of the HTML standard, but also because dynamic documents can hog the network. They require larger, longer downloads than their static counterparts, and they require many more (in the case of client-pull) or longer- term (for server-push) client/server connections. Multiple connections on a single server are limited to a few of the millions of web users at a time. We'd hate to see your readers miss out because you've created a jiggling image in a dynamic document that would otherwise have been an effective and readily accessible static document that more people could enjoy.



HTML & XHTML(c) The definitive guide
Data Networks: Routing, Security, and Performance Optimization
ISBN: 596527322
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Tony Kenyon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net