On Thu, Mar 5, 2009 at 10:27 AM, Jsbeginner <jsbegin...@monarobase.net> wrote:
> Hello, Just to say that I've got a bit further in my search :
> //header('Content-Length: '.filesize('test.js'));
> (Content-Length line removed) Has no lag...
> My guess is there is a problem with gzip or something that corrupts the
> So I'm still not sure if this is a PHP problem or an apache problem but any
> help would be great :)
> Jsbeginner a écrit :
>> I don't know for sure is this problem is only related to PHP so I hope
>> I've posted in the right list.
>> My problem is that with certain headers my script takes about 5 seconds
>> before sending the page, no matter how small the file I try to load...
>> My server :
>> Apache 2.2
>> PHP 5.2.9
>> Here's my code :
>> header('Content-Length: '.filesize('test.js'));
>> test.js is only a few lines long, and if I remove the header content type
>> the file loads instantaniously do it's not a problem with readfile.
>> I thought about zlib gzip taking maybe a long time to load but I've
>> changed the compression level from 6 to 1 and the file still has a the same
>> My server responds very fast for eveything else except this script. Do you
>> have an idea what might be causing this lag ?
>> Thanks in advance :)
whatever application is reading your script's output? As it has
already been mentioned, Apache may be looking for your content type in
some sort of lookup table, not finding it, and taking its sweet time
returning control back to PHP while it grabs at straws to match.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php