Browser Cache Control
Introduction
Browsers by default store a local copy of pages visited, called a cache, so that subsequent accesses to these pages will be faster. However, sometimes you do not want your pages to be cached, for example, your news pages, or pages created dynamically. The hypertext transfer protocol (HTTP) and HTML provide means to do this. This page describes the different techniques. I have found that not all browsers are equal in this aspect of browsing, so it would be wise to use as many as possible to ensure that your page is really not cached.
HTTP
HTTP provides a header that you can send to the browsers to stop the page being cached. This header, the 'Expires' header, tells the browser when the page will expire. If you set the date to sometime in the past, the page is not cached! So as an example (that I use!), the following PHP code will set the expiry date for the page to sometime in 1997!
Of course you need to be able to send headers from the server, which means that you need some form of server-side scripting, such as PHP and Perl. This is the major limitation. However, I have found that the Opera browser (at least the 6.0 version) does not respond to cache control measures except for the HTTP header above. So try to use this if possible.
HTML
HTML provides the page creator with 'meta tags'. These are not displayed by the browser, but provide information that the browser and search engines (or whatever/whoever is interested) about the page. Two meta tags are of interest here, one directly applicable, and one of peripheral interest.
The 'no-cache pragma' is a meta tag that has the following format:
This meta tag tells the browser not to cache the page.
Search engines
