On Wed, 4 Aug 2004, Justin Erenkrantz wrote:

--On Wednesday, August 4, 2004 4:52 PM -0400 Brian Akins <[EMAIL PROTECTED]> wrote:
The thing that sucks is if you vary on User-Agent.  You wind up with a ton
of entries per uri.  I cheated in another modules by "varying" on an
environmental variable.  Kind of like this:

BrowserMatch ".*MSIE [1-3]|MSIE [1-5].*Mac.*|^Mozilla/[1-4].*Nav" no-gzip

and just "vary" on no-gzip (1 or 0), but this may be hard to do just using
headers...

Note that BrowserMatch with regexp's is ridiculously expensive. Minimizing the need for that would be goodness, I think. -- justin

But it couldn't be as expensive as caching a variant for every User-Agent that accesses your site. What is probably needed is
CacheVaryOn env-variable
which would override the vary-matching decision to vary only on the content of env-variable (which could be just on/off in this case), but not touch the actual Vary: header, since down-stream caches wouldn't have the extra logic needed determine if they needed to vary.


Joshua.



Reply via email to