Search squid archive

Re: Squid Doesn't Cache Some URLs, Does it Examine Content?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

> Ralph Corderoy wrote:
> >       Expires             -
> >       Cache-Control       -
> >       Last-Modified       -
> 
> These are the important headers which squid uses to determine if it
> can cache the object and how long for.

Oh yes, of course, I see now having compared to a *.gif from the same
site which does have a Last-Modified and an Etag.

> A javascript file is usually static so would normally be served with
> at least a Last-Modified header. If it is not then perhaps the .js
> files are being dynamically created with each request. From your
> squidclient output it looks like none of those headers are returned.

They're not.  I've started talking to the site's webmasters about this
and them shipping Javascript as text/html.

> To get these cached you will need a refresh pattern that forces the
> file to be cached without these headers, i.e. where the minumum field
> is more than 0. A refresh pattern of: refresh_pattern \.js 10 50% 20
> would cache all .js file even those without the above headers for at
> least 10 minutes.

Ah, thanks.  Yes, I've got that to work with three quite specific
patterns that target the areas holding Javascript on this site.  That
cuts down the baggage on each page access quite considerably.

Thanks also to Henrik for also pointing this out and the other ircache
mirrors.

Cheers,


Ralph.



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux