Client-Pull Documents

Client-pull documents are relatively easy to prepare, and you can run them locally without requiring an HTTP server. That’s because the client-pull document has the browser request and load another document, even if from local storage. All you need to do is embed a <meta> tag into the header of your HTML or XHTML document. The special tag tells the client browser to display the current document for a specified period of time and then load and display an entirely new one, just as though the user had selected the new document from a hyperlink. (Note that currently there isn’t an easy way to change just a portion of a document dynamically using client-pull, though you could use frames if you wanted a split-screen effect.) [<meta>, 6.8.1]

Uniquely Refreshing

Client-pull dynamic documents work with all the popular browsers because they respond to a special HTTP header field called Refresh.

You may recall from previous discussions that whenever an HTTP server sends a document to the client browser, it precedes the document’s data with one or more header fields. One header field, for instance, contains a description of the document’s content type, used by the browser to decide how to display the document’s contents. For example, the server precedes HTML documents with the header “Content-type: text/html,” whose meaning should be fairly obvious.

As we discussed in Chapter 6, you can add your own special fields to an HTML document’s HTTP header by inserting a <meta> tag ...

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