Hi

i spend the whole last night figuring out the following:

IE6.0 has massive problems handling no-caching headers.

First for PHPLIB 7.2d users:

--
<? page_open(array("sess" => "mysess","auth" => "myauth"));
header ("Content-type: application/pdf");
header("Content-disposition: inline; filename=test.pdf");
$length = filesize("a.pdf");
header ("Content-length: $length");

readfile("a.pdf");

page_close();?>

If allow-caching is set to no

page_open sends a :

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0");

header("Pragma: no-cache");

It seems as if IE6.0 is not interpreting the content-type, an content-disposion header
after the no caching header is send.

it makes no difference if you are using phplib
or your are sending the caching header manual.

workaround :

Commenting out the header lines in session.inc or add a parameter to the page_open function to turn on/off nocaching.

Further more it seems as if this is only occuring on a ssl connection.

hopefully this information will prevent others from running in that pitfall.

if i am wrong or someone discovers another solution -> please keep me informed.

testsystem was :
apache 1.3.20 + php 4.0.6 (linux 2.4.18)

regards,
niko

    Write a Reply...