Re: cache
| From: | Dustin Pate | Date: | Thu, 12 Jun 2003 09:01:15 +0000 |
| Subject: | Re: cache | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151213@lists.php.net to get a copy of this message | ||
"Diana Castillo" <diana@interhotel.com> wrote in message
news:20030611154404.83066.qmail@pb1.pair.com...
> what code can I put at the begining of a php page so that the result from
> the cache is never shown ?
>
>
The following code should eliminate the cache for every broswer out there.
<?php
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-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>