loader image

Web Documents

Web document is a web based document which opens with a browser whether connected to network or not. Owner of the document can change and modify that document any time.

There are three types of web documents.

  • Static
  • Dynamic
  • Active

Static Web Document

They are fixed content documents created and stored in server. Client gets only copy of the document. The contents of the files are determined when created and not when it is used.

Dynamic Web Document

Dynamic web documents are created by server only when browser request document. When request arrive, server run the application program that create dynamic document and return output as response to browser. So contents of dynamic document can vary from one request to another. Two ways to create dynamic documents are,

  • Common Gateway Interface – A technology that create/handles dynamic documents.It is a set of standards that defines how dynamic documents can be created. How datas can be input to program. How output is used.
  • Scripting Technologies like PHP,JSP,ASP…etc embedded in HTML page.

Active Web Document

These are the program runs at the client side. When the browser request for active documents ,server send copy of document or script and document is then run on client site. Active documents are created in two ways,

  • Java Applets – programs written in java on the server are compiled and ready to run.Browser create instance of this applet and runs it.
  • Javascript is interpreted and run by the client at the same time.
StaticDynamicActive
Fixed content documents.Created by server when browser request document.The program or script runs at the client side
Created and stored in server.server run the application program/script that create dynamic document.Server send copy of document or script to browser.
Client gets only copy of the DocumentFresh document is created for each request.Document is then run on client site.
Contents of the files are determined when created and not when it is used.Contents of dynamic document can vary from one request to another.Created in two ways:
Java Applets & JavaScript
User cannot change document.Two ways to create dynamic documents:
Common Gateway Interface & ScriptingTechnologies

Common Gateway Interface(CGI)

It is a server side program launched by a web server to generate a dynamic document. It receives encoded information from remote client (user’s browser) via STDIN and environment variables and it must produce a valid HTTP header and body on STDOUT. CGI is a protocol between web server and a seperate program. Server encodes the clients form input data -> CGI program -> decodes the form and generates output.The programs that obey CGI are shell ,C ,C++ ,python ,perl..etc.

Writing CGI Script

  • User enters data in form.
  • User presses submit button.
  • Data sent to web server with URL or CGI.
  • Server starts a CGI and passes data.
  • CGI processes data and generate HTML page.

CGI Interaction Process

  • Read the data.
  • Process data
  • Output a html response header.
  • Generate a document.

CGI scripts are mainly in two ways – HTTP GET & HTTP POST

HTTP GETHTTP POST
Stores data in URL.Sends form data seperate from request.
Bookmarked for canned requests.But cannot be bookmarked.
But has limitations on total size of data requested.No size limitations.
Can be cached.Cannot be cached.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to Top