note 52694 added to function.header
| From: | com dot gmail at schaefer dot peter | Date: | Tue, 10 May 2005 06:02:05 +0000 |
| Subject: | note 52694 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89191@lists.php.net to get a copy of this message | ||
Regarding the IE pdf problem, doing the variation of not sending an
Accept-Ranges: bytes
header seems to make a difference. Strangely enough, some pdfs just work fine without these
complications, so maybe changing that header just forced invalidation of the IE cache(I had emptied
it, but who knows how IE really works).
//header("Accept-Ranges: bytes");
$filename= 'Labels'. date("ymdhis") . '.pdf';
//FIX: IE6
header('Content-type: application/pdf');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Pragma: public");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
//header("Cache-Control: private");
$pdf->stream( array('Content-Disposition'=>$filename) );
This is a large pdf file.
For a smaller pdf file, the straightforward thing worked too:
header("Accept-Ranges: bytes");
header("Cache-Control: private");
$pdf->stream();
Weird :-/
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52694
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52694&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52694&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52694&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52694&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52694&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52694&report=yes
Search -- http://master.php.net/manage/user-notes.php