Private Cache Headers in IE and Mozilla
| From: | Eli | Date: | Sun, 20 Mar 2005 01:53:05 +0000 |
| Subject: | Private Cache Headers in IE and Mozilla | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211125@lists.php.net to get a copy of this message | ||
Hi,
I want to cache a PHP page privately for a week.
What headers should I send to make it work both in Mozilla and IE?
I have set these headers, but those work only for IE:
<?php
$max_age=604800;
header("Date: ".gmdate("D, d M Y H:i:s",time()));
header("Cache-Control: private");
header("Cache-Control: max-age=$max_age",false);
header("Expires: ".gmdate("D, d M Y H:i:s",time()+$max_age)." GMT");
?>
What are the correct headers?
-thanks, Eli