Re: Disable all caching
| From: | tedd | Date: | Wed, 11 Oct 2006 14:39:20 +0000 |
| Subject: | Re: Disable all caching | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242977@lists.php.net to get a copy of this message | ||
At 11:17 AM -0400 10/10/06, Benjamin Adams wrote:
I have a php (ver 4.x) script that is being cached. I have placed: <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> but the page is still being cached. I'm not sure if its apache or the php. How can I disable all caching? is there something I can set in php.ini? (Mac OS X Server) Thanks BenBen: I use this: <?php # nocache.php // this script prevents all caching // expires on any past date header ("Expires: Mon, 26 Jul 1997 05:00: GMT"); // last modified at current date and time header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); // for HTTP 1.1: header ("Cache-Control: no-store, no-cache, must-revalidate"); header ("Cache-Control: post-check=0, pre-check=0", false); // for HTTP 1.0 header ("Pragma: no-cache"); ?> tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com