[squid-users] Squid Doesn't Cache Some URLs, Does it Examine Content?

From: Ralph Corderoy <ralph@dont-contact.us>
Date: Sat, 20 May 2006 12:15:26 +0100

Hi,

I'm finding one site is slow to access with Squid 2.5.8-3ubuntu1.4.
Squid's logs show that a bunch of URLs ending in `.js' aren't being
cached. I've examined {access,cache,store}.log with debug at ALL,9 and
it all seems OK; I don't see it decide not to cache. Nevertheless,

    $ squidclient http://www.housepricecrash.co.uk/scripts/javascript/global.js |
> tr -d \\015 |
> sed '/^$/q'
    HTTP/1.0 200 OK
    Date: Sat, 20 May 2006 11:07:02 GMT
    Content-Length: 545
    Content-Type: text/html; charset=ISO-8859-1
    Server: Apache/2.0.53 (Fedora)
    X-Powered-By: PHP/4.3.11
    Via: 1.1 webcacheH13 (NetCache NetApp/5.5R3D3)
    X-Cache: MISS from blake.inputplus.co.uk
    X-Cache-Lookup: MISS from blake.inputplus.co.uk:3128
    Proxy-Connection: close

    $ squidclient http://www.housepricecrash.co.uk/scripts/javascript/global.js |
> tr -d \\015 |
> sed '/^$/q'
    HTTP/1.0 200 OK
    Date: Sat, 20 May 2006 11:08:15 GMT
    Content-Length: 545
    Content-Type: text/html; charset=ISO-8859-1
    Server: Apache/2.0.53 (Fedora)
    X-Powered-By: PHP/4.3.11
    Via: 1.1 webcacheH13 (NetCache NetApp/5.5R3D3)
    X-Cache: MISS from blake.inputplus.co.uk
    X-Cache-Lookup: MISS from blake.inputplus.co.uk:3128
    Proxy-Connection: close

    $

One odd thing is their Apache looks mis-configured. The URL ends in
`.js', the content is Javascript, yet the content-type header is
text/html rather than application/x-javascript. I was wondering if
Squid looks at the content of text/html replies and if it can't parse
them marks them as `don't cache'.

From somewhere else on the net with no Squid:

    $ wget -q -s -O - \
> http://www.housepricecrash.co.uk/scripts/javascript/global.js |
> sed '/^$/q'
    HTTP/1.1 200 OK
    Date: Sat, 20 May 2006 11:15:34 GMT
    Server: Apache/2.0.53 (Fedora)
    X-Powered-By: PHP/4.3.11
    Content-Length: 545
    Keep-Alive: timeout=5, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=ISO-8859-1

    $

Other things to try welcome. I've read the FAQ and the Wiki FAQ, etc.

Cheers,

Ralph.
Received on Sat May 20 2006 - 05:15:35 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:02 MDT