HTTP - Other Headers

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

Two HTTP headers you might find relevant when programming CGI are the Expires and Pragma header. Both tags are used to prevent Web browsers from caching documents. When a browser caches a document, it stores a copy locally to save itself from having to download the document again if the page is revisited. For example, suppose that you provided a news service over the Web that periodically provided up to date news articles. The document located at a URI, might have changed several times over a period of time. Many browsers will cache a document the first time it accesses it and then reload that cache document when the user tries to go back to it by using the browser's Back button.

You can prevent the Web browser from caching the document by either using the Expires or the Pragma header. Expires enables you to declare a date and time when the document should expire; once that time has come, the browser should access the file from the server rather than from its cache.

If you never want a document cached, you could either set the expire date to be the same time you sent the document, or you could use the Pragma header. The Pragma header enables you to send customized directives to each receiving client. Web communication is not always simply between two parties. Many times, there are intermediate parties communicating with the browser and the server.

CGI output will enable you to create dynamic documents, whet her they are HTML or graphics.

Delivering an HTML document by using a CGI program is relatively simple. However, remember to be careful to specify proper pathnames in your HTML tags.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.