At 08:13 17/11/01, Scott wrote:
>In article <00bd01c167e5$3f6ffc80$ac8e5e83@UPAWP1>,
>  [EMAIL PROTECTED] (W P) wrote:
>
> > is there any way, possibly using a header, to force a browser to get the
> > newest version of a page?
> > the problem that i'm having is that my guestbook script is creating an 
> html
> > file, then redirecting the user to that file, but if they have viewed it
> > before, they are getting the old file.
> > thanx
>
>try the -expires=>$value pair in the start_html() function of CGI.pm

I've found the 'expires' header by itself not to be enough to guarantee 
cachebusting under all browsers. IE in particular is troublesome and will 
not always interpret an HTTP-EQUIV in the same way it would a real HTTP 
header (there's a load of articles on the Microsoft Knowledge Base about 
this, eg. http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP).

The headers I use are:

Expires: <a time in the past>
Last-Modified: <expression that evaluates to Now>
Cache-Control: no-cache, must-revalidate
Pragma: no-cache

and I think you pretty much need all four if you want to be confident that 
your users will never be looking at an old version of the page.

best,

Mo




Mo Holkar
Undying King Games
[EMAIL PROTECTED]
http://www.ukg.co.uk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to