httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Marantz <jmara...@google.com>
Subject Re: Vary:User-Agent, best practices, and making the web faster.
Date Sun, 05 Jun 2011 11:42:31 GMT
On Sun, Jun 5, 2011 at 7:32 AM, Ben Noordhuis <info@bnoordhuis.nl> wrote:

> On Sun, Jun 5, 2011 at 02:15, Joshua Marantz <jmarantz@google.com> wrote:
> > On Sat, Jun 4, 2011 at 7:58 PM, Ben Noordhuis <info@bnoordhuis.nl>
> wrote:
> >> Some popular OSS packages depend on Vary: User-Agent to make
> >> downstream proxies (reverse or forward) do the right thing.
> >
> > I'm pretty interested in deconstructing this further.  Can you be more
> > specific?   Which OSS packages?  Under what scenario would a proxy do the
> > wrong thing in the absence of Vary:User-Agent (other than, obviously,
> when
> > the content actually varies based on user-agent)?
>
> From first-hand experience (because I broke it): Magento, a popular
> PHP e-commerce framework. Magento (or one of its plug-ins) generates
> browser-tailored HTML and sets the Vary header to ensure that
> downstream proxies send the right HTML to the right client. If you
> remove or ignore the header, the layout of your site breaks.
>

This is a case where the content varies based on user-agent.  The
recommendation on the mod_deflate doc page is add vary:user-agent for any
non-image.  Can you think of a case where the absence of a vary:user-agent
header causes broken behavior when the content doesn't vary?

I'm not objecting to setting vary:user-agent when content varies: that's
what it's for.  I'm objecting to setting vary:user-agent when content does
*not* vary.  The mod_deflate documentation unambiguously recommends setting
vary:user-agent, and my feeling is that this is to work around a bug that
exists only in IE5 or pre-2007 patch of IE6.

-Josh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message