Re: [squid-users] Reverse proxy and user-agent

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Fri, 09 Mar 2007 20:39:26 +0100

fre 2007-03-09 klockan 12:52 +0100 skrev Carl Abramsson:

> Everything works OK, except for one small detail. Squid caches based
> on user-agents so this is what happens:
> Client with IE -> /somepage.html -> Cache miss
> Client with IE -> /somepage.html -> Cache hit
> Client with Firefox -> /somepage.html -> Cache miss
> Client with Firefox -> /somepage.html -> Cache hit

Sounds like your server says the content varies based on the User-Agent.
(Vary header).

Squid does not separate cache on it's own. It simply follows the
instructions given by the origin. If there is no instructions about
variance (as indicated by the Vary header) then every request gets the
same cached copy of of the url.

> Is it possible to turn of this and let squid return the same page to
> clients with different useragents? I know this could be bad in some
> cases, but it's OK for our site and we really want the hit ratio to be
> as big as possible since the latency is horrible.

Check your server configuration. For some reason it's returning "Vary:
user-agent". Could also be "Vary: accept-encoding" which perhaps is
likelier.. Firefox and IE sends similar but not identical
Accept-Encoding headers..

Regards
Henrik (also in Stockholm).

Received on Fri Mar 09 2007 - 12:39:35 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 31 2007 - 13:00:02 MDT