JDT

 

FREE Downloads
Articles
Tutorials

 
Google

Common Gateway Interface (CGI) - Part 1


Graphical web browsers first appeared on the scene in about 1993, and for a while web users were content to view static web pages, which always displayed the same content each time you visited them. After a while though, people began to expect more from their web experience and one of the results of this was the arrival of dynamic web pages.

These days there are plenty of web technologies and languages that allow the user of a web browser to execute a program on the web server, and to thereby receive dynamic as well as static content, but the first to offer this capability was the Common Gateway Interface (CGI) technology.

Browsing the World Wide Web

The Web is basically two systems trying to exchange data with each other: the client (web browser) on one side who is normally trying to get data, and the web server on the other side who sends data to the client.

The client makes a request for a web page, and then the web server tries to fetch that page from a hard disk and send it to the client.

The Uniform Resource Locator (URL)

To request a web page a client uses a Uniform Resource Locator (URL), for example, http://www.efghij.com/introduction.htm.

  • http is the usual protocol (set of rules) used for transferring web pages. It means Hypertext Transfer Protocol. Other protocols are https, which means secure http, and ftp, which means File Transfer Protocol.
  • www.efghij.com is the hostname. This is the name of the web server and is sometimes written as an Internet Protocol (IP) address, for example, 123.618.934.321. efghij.com is also known as the domain name.
  • introduction.htm is the file (web page) on the server to be retrieved.

If the web page exists, it is sent from the server to the client; if it doesn't, a 'missing page' error message is displayed in the web browser.

Dynamic Web Pages

When sending a static web page, the server simply needs to locate the required page and then send it to the browser.

Sometimes though, this is not enough, and the web server needs to send dynamically-generated content to the web browser. A typical example of this is when data is extracted from a database based on some search criteria entered into the browser. The reason pages like this are known as dynamic web pages is because much of the content displayed on the resultant web page will be different each time the page is sent to the browser. In other words, different searches will generate different content for the web page.



Go back to Articles home page

Go back to Programming and Web Development Articles home page



Earnings Tracker is John Dixon Technology's FREE accounting and bookkeeping software tool for contractors and freelancers.

The software is written in PHP and MySQL and is available to use for FREE online, or as a FREE download.

Earnings Tracker lets you keep track of your company's revenue and spending, track salaries, expenses, income tax, national insurance contributions, calculate corporation tax due, dividends that can be taken by shareholders, and generate dividend tax credits.

Earnings Tracker can also be used simply as a dividend, corporation tax, or VAT calculator.

free accounting software
 


JDT

Copyright Notice for John Dixon Technology Ltd

Privacy Statement

Terms & Conditions