Web Server Concept for Beginners
(October 2004)

Table of contents

Simple HTML Document

Dynamic Document (PHP, ASP, cgi-bin, ...)

Client-side processing (javascript, plug-ins, ...)

Combining all together

Simple HTML Document

Short explanation of terms appearing in the following diagram :
Host
synonym for a computer
Web server
program which serves web pages

This is what happens when a user wants to get a simple HTML file:
  1. The browser sends request for index.html to the remote web server (www.xyzt.com)
  2. The web server sends the HTML file back without any more processing
Such a page is called static.

Dynamic Document (PHP, ASP, cgi-bin, ...)

The following diagram shows how a web server will handle a request for a PHP file (PHP is an example, and many other methods behave the same way - ASP, cgi-bin programs, ...):


  1. The browser sends a GET request to the remote web server for a PHP file
  2. The web server recognizes the .php extension, and does a special processing on the PHP file in order to generate a temporary file
  3. The web server sends this temporary file back to the user
This is called server-side processing, because the processing is done in the server.
From this diagram, we naturally deduce what can be done by server-side processing: And what cannot be done:

Client-side processing (javascript, plug-ins, ...)



This shows how client-side processing occurs:
  1. The web browser sends a request for an HTML file
  2. The web server sends it back
  3. The web browser receives the index.html file and processes javascript, plug-ins (java, audio, video,...)
    (this information is included in the index.html file)
  4. The web browser displays the page

Combining all together

It is possible to use client-side processing and server-side processing for the same file.