Re: [squid-users] refresh_pattern and forcing "gifs" to be cached

From: Joao Clemente <[email protected]>
Date: Wed, 14 Aug 2002 15:09:03 +0100

> What if these are spacer graphics, used by web designers to control site
> layout, and therefore served with no-cache tags? Just a thought.

Well, I looked up the URL by following Donovan Baarda tip (thank you Donovan) of using wget -S and this was what I've found:

jpcl@Beach:~$ wget -S http://www.negocios.pt/imagens/noticias/belmiro_de_azevedo_01.gif
--14:26:02-- http://www.negocios.pt/imagens/noticias/belmiro_de_azevedo_01.gif
           => `belmiro_de_azevedo_01.gif'
Resolving www.negocios.pt... done.
Connecting to www.negocios.pt[212.55.136.42]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Server: Microsoft-IIS/5.0
 3 Cache-Control: no-cache
 4 Expires: Wed, 14 Aug 2002 13:33:33 GMT
 5 Connection: keep-alive
 6 Date: Wed, 14 Aug 2002 13:33:33 GMT
 7 Content-Type: image/gif
 8 Accept-Ranges: bytes
 9 Last-Modified: Thu, 08 Jul 1999 16:23:04 GMT
10 ETag: "0a483275ec9be1:95c"
11 Content-Length: 7882

This is not a spacer graphic, its a image that comes with a news article. I've checked the page log and it exibits the same Cache-Control , and reports a expire date equal to the actual date, just like this one.
I think that this must be a bad web design or maybe a bad server config...
As U can see, the Last-Modified date reports to 1999, so why shouldn't this image be cached?

I think I'll have a problem here tough.. If I understood correctly, refresh_pattern can only give a min freshness time if the object does not have the "no-cache" explicitily.. and all the images on this site do have it.

But, for instance, check this other example:
jpcl@Beach:~$ wget -S http://webmail.dad.be/exchange/forms/nextmsg.gif
--14:57:15-- http://webmail.dad.be/exchange/forms/nextmsg.gif
           => `nextmsg.gif.1'
Resolving webmail.dad.be... done.
Connecting to webmail.dad.be[194.78.137.30]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Server: Microsoft-IIS/4.0
 3 Connection: keep-alive
 4 Date: Wed, 14 Aug 2002 14:03:07 GMT
 5 Content-Type: image/gif
 6 Accept-Ranges: bytes
 7 Last-Modified: Thu, 19 Oct 2000 05:00:00 GMT
 8 ETag: "048e26e8939c01:f5f"
 9 Content-Length: 91

This one also does not get cached. And it does not get cached because it does not have and Expires header, I think.
Once again, this one has Last-Modified date from so long that it could be cached.

Well, once again I'm looking for opinions:
If its not adviced to do a generic refresh_pattern rule for forcing cahing of all gifs as I stated in my former mail, maybe it's not so bad to place those refresh_pattern rules for particular sites?
That way I could check out my dayly or weekly stats and see "hmmmm... this site is one of the most requested I have and has a lousy (almost 0%) hit rate.. let me see what is it made of.. hmmm.. lets add a rule for caching this things on this site"

Any advice on this?

-- 
 There is a very thin line between being selfish and having the freedom to
 choose what's best for me...
 H� uma linha muito t�nue entre ser ego�sta e ter liberdade para decidir o
 que � melhor para mim... - Joao Clemente
Received on Wed Aug 14 2002 - 08:14:58 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:37 MST