Hello Girish,

Monday, November 12, 2001, 4:29:55 PM, you wrote:

GN> Hi

GN> I've found some code which i put it into this function. I've never got the
GN> meta tag technique to work but this seems to do the trick.

GN> Call noCache() before outputting anything to the page.

GN> function noCache() {
GN> header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
GN> header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
GN> modified
GN> header ("Cache-Control: no-cache, must-revalidate");  file://HTTP/1.1
GN> header ("Pragma: no-cache");                          // HTTP/1.0
GN> }

Thanks! That's what I've been looking for. But there is something
wrong with this headers. I pasted the code above, and peges really
stopped loading from cache. But... I tested it with IE 5.5 SP2 and
Netscape 4.77 (I don't use Netscape 6.x because it's just useless
cputime eater). The page works fine with Navigator, but IE shows blank
page each time I click a link. It shows the page properly only after
clicking Refresh. I remember I have the same problem 1/2 year ago when
I was unsuccesfully tried to win the battle with the browser cache :).
Now I commented the 3rd header (with "cache-control"), and now IE
works perfect too. I don't know why it works on your pages :). The
problem is not in my personal IE because the same problem was (as I
said) whan I used IE 5.0.
So, if there are some people who have the same problem, I would
suggest to put these 3 lines on the top of the page:

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Pragma: no-cache");

Thanks to Girish and others who tried to help me!

P.S. There can be another problem: client's clock. If it's 20 Jan 1985
on client's machine, than ... Do you think I can put in the first
header some very old date like 1 Jan 1970? I just want it to work in
any case.

-- 
Best regards,
 Olexandr                            mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to