Doc #60516 [Opn->Csd]: Bad Cache-Control header causes IE to rapidly re-download

From: Date: Wed, 21 Dec 2011 14:48:05 +0000
Subject: Doc #60516 [Opn->Csd]: Bad Cache-Control header causes IE to rapidly re-download
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7691@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60516&edit=1 ID: 60516 Updated by: bjori@php.net Reported by: florian dot hoech at gmx dot de Summary: Bad Cache-Control header causes IE to rapidly re-download -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Windows PHP Version: Irrelevant -Assigned To: +Assigned To: bjori Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2011-12-21 14:47:52] bjori@php.net Automatic comment from SVN on behalf of bjori Revision: http://svn.php.net/viewvc/?view=revision&revision=321292 Log: post- and pre-check headers aren't needed for IE (and in fact IE bugs cause them to double download the file), see bug#60516 ------------------------------------------------------------------------ [2011-12-13 23:27:13] florian dot hoech at gmx dot de Forgot to mention the downloads are 'background' downloads, the user of the browser won't notice them until he monitors bandwidth. Of course the requests appear in access.log on the server and waste actual bandwidth. ------------------------------------------------------------------------ [2011-12-13 23:21:27] florian dot hoech at gmx dot de Description: ------------ --- From manual page: http://www.php.net/function.readfile#refsect1-function.readfile-examples --- This is a documentation problem. The header 'Cache-Control: must-revalidate, post-check=0, pre-check=0' in the example can cause MSIE to rapidly re-download, wasting massive bandwith in the worst case (in my case one original request for a 14 MB file caused 469 automatic subsequent downloads by MSIE). It would be best to remove that header from the example. Background info can be found here: http://blogs.msdn.com/b/ie/archive/2006/06/01/613132.aspx (It does NOT only affect IE 7 Beta 2 as the article may make it seem. I was able to verify the problem in IE 9). Test script: --------------- Just the example script from the docs with any file. Expected result: ---------------- The file should be downloaded only once per request. Actual result: -------------- One original request for a 14 MB file caused 469 automatic subsequent downloads by MSIE when the 'Cache-Control: must-revalidate, post-check=0, pre-check=0' header was set. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60516&edit=1

« previous php.doc.bugs (#7691) next »