#34223 [NEW]: Some of suggested no-cache headers are useless
| From: | pornel at despammed dot com | Date: | Tue, 23 Aug 2005 19:08:21 +0000 |
| Subject: | #34223 [NEW]: Some of suggested no-cache headers are useless | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969369693@lists.php.net to get a copy of this message | ||
From: pornel at despammed dot com
Operating system: *
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Some of suggested no-cache headers are useless
Description:
------------
In http://php.net/header
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
Despite disclaimer under this example I think useless headers should be
removed.
last-modified is last resort in finding freshness of an object, and is not
needed when expires and cache-control are present.
post-check and pre-check headers are always ignored when no-cache is
specified.
on most proxies no-cache and no-store make no difference, but the latter
may impose extra restrictions in handling "sensitive information" and
should not be abused just for any dynamic data.
Expected result:
----------------
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Actual result:
--------------
abuse of http by clueless copy'n'pasters.
backtraces to these lines in php docs :)
--
Edit bug report at http://bugs.php.net/?id=34223&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34223&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34223&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34223&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34223&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34223&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34223&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34223&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34223&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34223&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34223&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34223&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34223&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34223&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34223&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34223&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34223&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34223&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34223&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34223&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34223&r=mysqlcfg