Re: Expiring other resources with HTTP headers

From: Date: Mon, 27 Feb 2006 16:12:26 +0000
Subject: Re: Expiring other resources with HTTP headers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231142@lists.php.net to get a copy of this message
I know I could reduce the expiration time to reduce this problem but most of the time those files do not change. What can I do to notify the web browser that the file in the cache is no longer valid? -William
William: Include 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"); ?> HTH's tedd -- -------------------------------------------------------------------------------- http://sperling.com

« previous php.general (#231142) next »