Re: Web Page Caching

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

 



pzee@creativeCgi.com (Philip Zee) writes:
> I don't know if this is the right list to send this question to. It
> appears that the browser caches the result after a PHP page updates
> the database. I have to manually reload it in order to see the
> updates. Does anyone know how to overcome this?

If you put these before any output from your script, that might help.

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
                                                 // always modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                          // HTTP/1.0

Read about cache control on e.g. http://vancouver-webpages.com/META/
and also check out http://www.php.net/manual/en/function.header.php


-- 
--Fredrik
"Why be a man when you can be a success?"
		-- Bertold Brecht

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux