Forum Moderators: phranque
Other than that, I think there are some cache-control/expires meta tags you can add to static html pages, but I'm not sure if all browsers obey these.
I have been looking and I found that Cache-Control general-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. The directives specify behavior intended to prevent caches from adversely interfering with the request or response. These directives typically override the default caching algorithms. Cache directives are unidirectional in that the presence of a directive in a request does not imply that the same directive is to be given in the response.
Note that HTTP/1.0 caches might not implement Cache-Control and might only implement Pragma: no-cache
There is documentation on it at [w3.org...]
I will be trying this over the holidays and I will let everyone know how it turns out and whast browsers conform to the syntax
<?php header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("cache-control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache");?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>50 KB Modem baud-rate test </title>
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="expires" content="FRI, 13 APR 1999 01:00:00 GMT">
<META name="ROBOTS" content="NOINDEX, NOFOLLOW, NOARCHIVE">
So far this method has had the desired effect of requiring a fresh page to be requested when the visitor hits refresh, or clicks on my retest link ( onclick=history.go(0) ). Before adding the php expires headers the greater percentage of browsers simply reloaded the page from the browser cache, ignoring the meta tags.
Wiz
There is only one way that you can really force most browsers to reload a page, and that is to semi-encrypt a URL at run time. I first had the idea 4 years ago working on an anti-leech program.
For instance if you make a link in CGI like the following with a variable of a page name, and the full date and time as another one (down to the millisecond):
[myDomain.com...]
All you have to do is serve that page via CGI. Make a simple routine that will not load pages that are past the current date and time.
This will force browsers to get a fresh copy, however several browsers will keep their content in their cache. It is more like having the browser get 20 diffrent named versions after 20 visits.
When used in conjunction with the other tags, as noted in this thread... it works even better. Sorry i haven't had time to lear PHP yet, but they are similair as far as i know.
Good Luck
-----
David Smith
[edited by: DaveAtIFG at 5:48 am (utc) on Dec. 31, 2003]
[edit reason] Trimmed sig [/edit]