Preventing caching using PHP headers

From: Date: Wed, 11 Jun 2003 16:12:38 +0000
Subject: Preventing caching using PHP headers
Groups: php.general 
Request: Send a blank email to php-general+get-151100@lists.php.net to get a copy of this message
Has anyone used this and found it helpful? For dynamically generated pages, yes, but is there any advantage for static pages that happen to be PHP? From a good caching tutorial at: http://www.mnot.net/cache_docs/#IMP-SCRIPT The header cited: <code> <?php Header("Cache-Control: must-revalidate"); $offset = 60 * 60 * 24 * 3; $ExpireString = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; Header($ExpireString); ?> </code> Thanks! Stephen

« previous php.general (#151100) next »