Re: Expiring other resources with HTTP headers

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

 



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

--
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