On Thu, 05 Mar 2009 15:45:35 +0100, Jsbeginner wrote:

> <?php
> header('Content-Type: application/x-javascript');
> header('Content-Length: '.filesize('test.js'));
> readfile('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 lag.

Content-Length MUST NOT be sent when using a
Transfer-Encoding (eg. gzip).

See: <http://tools.ietf.org/html/rfc2616#section-4.4>

Presumably, Apache (or the browser) is waiting for the
"missing" content, and then times out.


/Nisse

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to