[squid-users] Squid

From: Michael Jurisch <archer@dont-contact.us>
Date: Thu, 18 Oct 2007 11:03:10 +0200

Hi Michael,

just wanted to ask whether you speak German as you name sounds like it/you could be German. :-) It would may help me in asking questions ... :-)

Thanks a lot,
Gruß
Micha

n Wed, Oct 17, 2007 at 03:30:03PM +0200, Michael Jurisch wrote:
> Ok, I tried it out but it doesn't have the effect I want. :-( Here is
> what I am doing: I go to www.foo.de/pharma.html (squid is the accel
> for www.foo.de) and the access_log of foo.de shows this:
>
> "GET /pharma.html HTTP/1.0" 200 200
> "GET /bild.jpg HTTP/1.0" 200 10107
> "GET /favicon.ico HTTP/1.0" 404 301
>
> I get the 200 code, which is fine.
>
> (BTW: Why does this request of favicon,ico appear? Is this an apache
> configuration thing?)

No, the browser requests the site's icon. Visit a site which has one, like http://www.abc.net.au/ and you'll see the icon shown in the location bar in Firefox. Originally this was retrieved by MSIE when a user added the page to their favourites (hence, favicon), but it's been adopted by other browsers and Firefox will request it any time you visit a site.

> Now, if I hit "F5" in Browser (with and without deleting the _browser_
> cache) the access log shows this:
>
> "GET /pharma.html HTTP/1.0" 304 -
> "GET /bild.jpg HTTP/1.0" 304 -
>
> I get the 304 code (which is correct), but I don't want to have this
> control request. E.g. I want to say that squid "isn't allowed" to look
> at origin server for 30 min. Squid should consider the file(s) as
> fresh for 30 min and _after_ this period it should look after the file
> on origin server.

This is probably because you're telling Firefox to refresh the page, which causes it to set an HTTP header that tells the proxy you want it to check for updated content. (Pragma: no-cache or something
similar?)

See what happens if you load the site normally, then open something else in your browser, clear its disc and memory caches, and then open the site normally again. This will cause it to make a regular request, which squid should serve directly from cache if it considers its cached object to still be valid.

Depending on your needs, you might want to look into the refresh_pattern options reload-into-ims and ignore-no-cache.
Received on Thu Oct 18 2007 - 03:03:20 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:01 MDT