NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP pages cache in spite of header() - ideas?

Phil Powell soazine at erols.com
Fri Aug 1 23:23:35 EDT 2003


// PREVENT CACHING FIRST BEFORE ANYTHING ELSE!
  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

I am using the following commands to force the PHP script to not cache; however, it still does cache.  Browser settings were checked and corrected; yet it still caches.

Suggestions?

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030801/aab6e6bf/attachment.html>


More information about the talk mailing list