|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-05 11:46 UTC] php at savignano dot de
When using sessions, the Expires header is set to a date in the past (1981) instead of being correctly calculated from the current date plus the session expire time. This leads to re-loading of the resource instead of using cached data in browsers that obey the Expires header and/or use HTTP 1.0.
Additionally, it is not possible to replace the Expires header using the header() function. Trying to do so results in the new correct date being appended after the old incorrect one (separated by a comma) which makes no sense.
The only way to achieve correct Cache-Control and Expires headers is to switch off the automatic session headers by calling session_cache_control('none'), and then set all headers on one's own. However, this is only a work-around.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
session_cache_control('none') was meant to read session_cache_limiter('none'). Sorry.There seems to be a misunderstanding: Using session_cache_limiter("private") will create the malformed Expires headers mentioned in my bug report.