httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Marantz <>
Subject Re: Vary:User-Agent, best practices, and making the web faster.
Date Sun, 05 Jun 2011 19:37:00 GMT
Thanks for the feedback, Ben!  You are omniscient in the ways of Apache.
 I'll try to lobby for an update to the mod_deflate page.

Your concerns about Magento are interesting -- my impression from our forums
and Twitter is that mod_pagespeed is successfully accelerating many Magento
sites now, since releasing the mod_rewrite workarounds, which we were able
to do thanks to your help a few months ago.  The reason that we don't have
problems with vary:user-agent on HTML is that we don't ever cache HTML under
any circumstance.  We assume HTML generally varies on user-agent, cookies,
locale-of-client, and is generally updated frequently.

Does Magento actually vary the content of CSS & JS based on user-agent?  Or
does it only vary the content of HTML?

You've dissuaded me from trying to infer the intent of the site
administrator, and we will find another way to phase in vary:user-agent
compliance without falling off a performance cliff.


On Sun, Jun 5, 2011 at 2:54 PM, Ben Noordhuis <> wrote:

> On Sun, Jun 5, 2011 at 13:42, Joshua Marantz <> wrote:
> > 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.
> Sorry, Joshua, we're conflating things. You raised two issues in your
> original post:
> 1. Updating the mod_deflate documentation. Seems reasonable. The Vary:
> UA recommendation was added in 2002 during a general clean-up of the
> mod_deflate documentation and the commit log doesn't tell why. You
> could open a bugzilla issue or raise it on the httpd-dev mailing list
> (the former is the proper channel but the bugzilla is something of a
> graveyard).
> 2. mod_pagespeed second-guessing the user's intent. That still seems
> like an unambiguously bad idea. To touch on Magento again, its
> documentation links (or linked) directly to that section of the
> mod_deflate docs and people are using that. If your module scans for
> and neutralizes that Header directive, you will break someone's site.

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