Building two-way communication.

Instead of just spreading information, websites are also often used to retrieve information. This is most commonly done using so called CGI programs. These programs run on a web server. They get their input from the form elements on a web page, a section of the URL string and/or cookies on the client computer. The information they retrieve can for example be added to a database or be sent to an e-mail address. Finally, the CGI program will produce a new document, which will be sent to the browser on the client computer. Mostly this is a new web page, but it can also be an image or audio file.

CGI can also be used to create server push documents. This means that the line between the server and client stays open and whenever new information is available, it gets sent to the client. An example of this is a photographic image of a site that changes every 30 seconds.