Three Basic Types of Web Documents
Three Basic Types of Web Documents
Static.
A static web document resides in a file that it is associated with a web server.
The author of a static document determines the contents at the time the
document is written. Because the contents do not change, each request for a
static document results in exactly the same response.
Dynamic.
A dynamic web document does not exist in a predifined form. When a
request arrives the web server runs an application program that creates the
document. The server returns the output of the program as a response to the
browser that requested the document. Because a fresh document is created
for each request, the contents of a dynamic document can vary from one
request to another.
Active
An active web document consists of a computer program that the server
sends to the browser and that the browser must run locally. When it runs, the
active document program can interact with the user and change the display
continously.
3
Advantages and disavantages of each document type
Static
Advantages: simplicity, reliability and performance. The browser can place a
copy in a cache on a local disk.
Disavantages : inflexibility,changes are time consuming because they require
a human to edit the file.
Dynamic
Advantages : ability to report current information (current stocks prices,
current weather conditions, current availability of tickets for a concert).
Because both static and dynamic documents use HTML, a browser does not
know whether the server extracted the page from a disk file or obtained the
page dynamically from a computer program.
Disavantages : increased cost and , like a static document, a dynamic
document does not change after a browser retrieves a copy. Thus ,
information in a dynamic document begins to age as soon as it as been sent
to the browser(stock prices).
Server push. The server runs the programs periodically and sends the new
document to the browser
Active
Advantages : ability to update information continously. For example, only an
active document can change the display quicly enough to show an animated
immage. More important, an active document can access sources of
information directly and update the display continously. For example, an
active document that dispays stock prices can continue to retrieve stock
information and change the display without requiring any action from the
user.