Re: Disable all caching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Ben

Ben:

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux