Posted by Rasmus Lerdorf on 09/02/05 20:53
Chris Shiflett wrote:
> Chris Shiflett wrote:
>
>> > And the browsers tend to redirect right away once they get this
>> > header.
>>
>> I would find that very surprising. Maybe I'll experiment.
>
>
> I tested this with Firefox 1.0.4, Firefox 1.0.6, and Safari 1.3. None of
> them request the new URL before receiving the previous response in its
> entirety. Maybe Internet Explorer does. :-)
Then you have configured your server to always turn on output buffering
or your test script is bad.
Try this:
<?php
header("Location: http://www.php.net");
$fp = fopen("/tmp/log.txt","w");
for($i=0; $i<1000000; $i++) {
$str = "Count $i\n";
echo $str;
fputs($fp, $str);
}
?>
What do you think you will see both on your screen and in /tmp/log.txt?
-Rasmus
[Back to original message]
|