PHP, Cache Control and Mac IE
| From: | Roger Spears | Date: | Wed, 18 Feb 2004 17:58:57 +0000 |
| Subject: | PHP, Cache Control and Mac IE | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178148@lists.php.net to get a copy of this message | ||
Hello List,
I am using the following in a PHP script:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
Most browsers will prompt the visitor to reload the data, but if a visitor is using IE 5.? on a Mac OS X machine, their browser's back button still shows them the original page from cache. At the top of the page, in HTML, I've also added (along with the above headers):
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, no-cache, must-revalidate">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
and still, the browser pulls from the cache.
I'm guessing this is a bug, but I'm wondering if any one has a work around?
TIA,
Roger