Updated April 3, 2023
Introduction to Web Documents
The world wide web (WWW) is a repository of information linked together from points all over the world. The WWW has a unique combination of flexibility, portability and user-friendly features that distinguish it from other services provided by the Internet. The documents in the World Wide Web can be grouped into three categories static documents, dynamic documents and active documents. These categories are based on the time the contents of the document are determined.
List of Web Documents
Given below is the list of web documents:
1. Static Documents
The documents that contain fixed content is called as a static document. Static documents are created and stored on the server. The client can get a copy of the documents only. In other words, we can say that the content of the file is determined when the file is created, not when it is used. Static documents, user cannot change the content, but the content server can be changed. When the client access the document, a copy of the documents is the sent, the user can then use a browsing program to display the documents.
Static documents are prepared using one of the languages which are mentioned below:
- HTML (Hypertext Markup Language)
- XML (Extensible Markup Language)
- XHTML (Extended Hypertext Markup Language)
- XSL (Extensible Style Language)
2. Dynamic Documents
Dynamic documents are created by a web server when the browser requests the document. When sea ever receives the request, it runs an application program or script which creates the dynamic documents. The server returns the output of the program or script as a response to the browser that requested the documents. A fresh document is created for each request; the content for dynamic documents may vary from one request to another.
For example, when we retrieve the date and time from the web server, the result differs for each request. This is because the date and time are dynamic as they change from moment to moment. A client can ask the client to date the program in Unix and send the result of the program to the client. CGI (Common Gateway Interface) is a technology used to create and handle the dynamic documents.
CGI:
It is a set of standards that defines how the content in dynamic documents is written, how the data are input into the program, and how it is shown. It allows programmers to use languages such as C, A clientorn shell, or Perl. Common gateway interface represents the standard that defines a common set of rules for any language or platform. C represents ms can also be used to access the other resources like database, graphic, etc.
There are some predefined terms and variables which can be used in Common gateway interface programs. A CGI program is a code which is written in one of the languages that CGI supports. The programmer who knows how to encode the sequence of action or task in the program, and has a knowledge of syntax, can write a CGI program. Dynamic documents sometimes referred to as server site dynamic documents.
3. Active Documents
For many applications, we need a program or script to be run at the client site. These are called as active documents. For example, suppose we want to run a program that creates animation graphics on the screen. Definitely, the program needs to be run at the client site where animation action takes place. When a browser requests an active document, the server sends a copy of the script or document; then, the document is run at the client.
Java Applets:
Java applets are used to create an active document. Java is a high level, an object-oriented programming language which allows a programmer to write an active document and browser to run it. It can also be a stand-alone program that doesn’t use a browser. An applet is a program which is written in java on the server. It is compiled and ready to be run.
The document is always in binary format. The client first creates an instance of this applet and then run it. The browser can run Java applets in two ways; one way is the browser directly request a java applet program in URL and receives the applet in binary format, the another way is browser can retrieve and run HTML file that has embedded the applet’s address as a tag.
JavaScript:
Active documents use the idea of scripts. We can also use JavaScript to create and active documents. If the active part of a document is small, then it can be written in a scripting language, then it can be interpreted at the same time client run the document. The script is not in the binary format; it is a source of code. JavaScript, which bears a small resembles to java, is a high-level scripting language developed for this purpose.
Conclusion
In this article, we saw the web documents concepts with its types such as static documents, dynamic documents and active documents. Here we have also seen the small CGI concept, which is used to create a dynamic document and Java and JavaScript that are used for active documents.
Recommended Articles
This is a guide to Web Documents. Here we discuss the introduction along with the list of the web documents respectively. You may also have a look at the following articles to learn more –