Search squid archive

Re: Caching based on accept-language

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

 



On 08/02/11 15:12, Jeff Gerbracht wrote:
I'm trying to set up squid to cache several of our dynamic pages for
which we have both EN and FR translations.  We use the browser setting
for language to determine which language to return to the user so the
URL is the same for both languages.  Is there any way to enable Squid
3.1 to use the URL in combination with the accept-language from the
header to generate the cache key.  Currently, whichever language is
first requested is what is returned by a cache hit.  We have apache in
front of squid so if squid can't do what we need, any suggestions on
how to work with apache and squid  in combination to cache both the
english and french versions of a page.

Squid does not (yet) support that find-grained level of smart variant handling. It will happily cache variants on the full-text of the named headers though.

What you need to do is specify the language variance in the same way you specify compressed/non-compressed variance.

Sent from the web server:
  Vary: Accept-Language

(it may need combining with the existing Vary header values, probably to "Vary: Accept-Language, Accept-Encoding")

With a ETag header as well wherever possible.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.10
  Beta testers wanted for 3.2.0.4


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

  Powered by Linux