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

From: Date: Tue, 13 Dec 2011 23:27:13 +0000
Subject: Doc #60516 [Com]: 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-7654@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 Comment by: florian dot hoech at gmx dot de Reported by: florian dot hoech at gmx dot de Summary: Bad Cache-Control header causes IE to rapidly re-download Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Windows PHP Version: Irrelevant Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 (#7654) next »