Understanding and Using CGI Scripts


This tutorial is designed to help HTML authors understand and use CGI scripts in their web sites. It is not designed to teach the fundamentals of HTML, or of programming languages like PERL, which are commonly used for CGI scripts.

If you are already familiar with how a WWW connection works, skip to the next section.


The Client-Server Relationship

Crudely drawn schematic of two computers connected to Internet

The Basics

Clients and Browsers

Users access web pages through Client computers, running software known as a Web Browser. Typically, a client will run a graphical browser such as Netscape or Microsoft Internet Explorer, or a text-mode browser such as Lynx. Other clients may include automated utilities for indexing, or even the telnet utility, which may be used for testing.

The browser software itself will often be referred to as a client; when we use that term, it should be clear from the context whether we are talking about a comptuter or a software package.

The client will have a connection to the internet, or to another network using the tcp/ip protocol. In order to do that, it must have an IP address, and it will usually have a host name. Typical IP addresses are numbers such as "192.188.199.5". Host names are names in human-readable form, such as "sailor.lib.md.us".

The client's connection to the internet must be fast enough to get information from the web at a speed comfortable to the user.

Servers

Web pages come from computers known as Web Servers. A web server also has a connection to the Internet, an IP address, and a host name. Some web servers will have more than one IP address and/or more than one host name.

Typically, the server's internet connection must be fast enough to satisfy all the requests for Web pages and related information, without any backlog.

The server computer runs Web Server software, which will often simply be called the server or server software. Like the use of the term client, when we use the term server, whether we mean a machine or a package of software should be apparent from the context.

The server does not need any way to display web pages (although it may be convenient for it to have client software installed). In fact, most servers run unattended, and don't even need an input device (such as a keyboard) to be web servers. They do, however, need to have adequate disk storage to hold all the data on a web site.

Surprisingly, web servers don't need to have monstrous amounts of processing power - their capacity to serve web pages is usually limited by the speed of their connection to the Internet.


Next - How the client requests a web page   ||   Table of Contents

©copyright 1996 Doug Lawson. Permission to reprint is granted as long as credit is given