Hi

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

Call noCache() before outputting anything to the page.

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

Regards


Girish


----- Original Message -----
From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 1:32 PM
Subject: [PHP] Help me to win the battle with browser's cache


> Hello php-general,
>
>   I have index.php, which has <a href="index.php?logout">Log out</a>.
>   When I click it, I am logged out the site. But I type "index.php" in
>   browser's address bar, press Enter and ... it shows "non-logouted"
>   page. What should I write in php code to tell browser something like
>   "forget about old page, don't display it, get the newest version"?
>   Some time ago I tried to do that in several ways and nothing gived
>   100% result. And other thing I saw was that Netscape and Explorer
>   behave in different ways in such cases. Could someone help me? Maybe
>   this topic was discussed before, but still... I appreciate greatly
>   any suggestion.
>
> --
>  Olexandr Vynnychenko                          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]
>


-- 
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