#49725 [Opn]: stupid cache parameters

From: Date: Wed, 30 Sep 2009 18:31:45 +0000
Subject: #49725 [Opn]: stupid cache parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-143087@lists.php.net to get a copy of this message
ID: 49725 User updated by: sec dot wb at heysoft dot de Reported By: sec dot wb at heysoft dot de Status: Open Bug Type: Session related Operating System: all PHP Version: 5.2.11 New Comment: In the description I copied the link twice, wanted to write: It says: "If both post-check and pre-check are specified and set to 0, both are entirely ignored" Previous Comments: ------------------------------------------------------------------------ [2009-09-30 18:29:49] sec dot wb at heysoft dot de Description: ------------ function session_start causes php to send the following line: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 This is quite stupid because no browser does care about "post-check=0, pre-check=0". IE will ignore it, as you can read here: http://blogs.msdn.com/ieinternals/archive/2009/07/20/Using-post_2D00_check-and-pre_2D00_check-cache-directives.aspx It says: "http://blogs.msdn.com/ieinternals/archive/2009/07/20/Using-post_2D00_check-and-pre_2D00_check-cache-directives.aspx" And apparently there even was a beta version of IE7 which did download all objects twice when "post-check=0, pre-check=0" was specified. So, I wonder why it is there in nearly each php page? Reproduce code: --------------- <?php // Start a session if(!defined('SESSION_STARTED')) { session_name('a_session_id'); @session_start(); define('SESSION_STARTED', true); } ?> Expected result: ---------------- No stupid cache control output Actual result: -------------- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49725&edit=1

« previous php.bugs (#143087) next »