Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98A8F6D74 for ; Sun, 5 Jun 2011 19:37:48 +0000 (UTC) Received: (qmail 78447 invoked by uid 500); 5 Jun 2011 19:37:48 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 78418 invoked by uid 500); 5 Jun 2011 19:37:48 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 78410 invoked by uid 99); 5 Jun 2011 19:37:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 19:37:48 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jmarantz@google.com designates 216.239.44.51 as permitted sender) Received: from [216.239.44.51] (HELO smtp-out.google.com) (216.239.44.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 19:37:43 +0000 Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p55JbMVp021786 for ; Sun, 5 Jun 2011 12:37:22 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1307302642; bh=CBwqV5FE1pf1dsP2LTrmixk/wdw=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Content-Type; b=wmcv/OI7Xk7LLKYcTOELdXKjFhxqYUaGG6vzixDxXNdKT9zpX5nqrpPBzQL2E99mE 9sXUUKYro9Qn/ubzdoxpg== Received: from pxi10 (pxi10.prod.google.com [10.243.27.10]) by kpbe11.cbf.corp.google.com with ESMTP id p55JbKHk029218 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 5 Jun 2011 12:37:21 -0700 Received: by pxi10 with SMTP id 10so1860691pxi.22 for ; Sun, 05 Jun 2011 12:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=FkLYI2wxqraR+a0Q49SWjIpjbkyTlDvG3Ex9IlB1/RI=; b=iSF5pDZt/XhcJ/a3VBpqtfShYcXM4WtGy80c4Wjda17Wufkv6p9NCC+3GzPyxHayjx 1ckU80mOnPyCRTnXRJMw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=D4pewwqC8xuVy6TfhSvcNFFZHdrLe9rIVCByEgNZXBHupAlyQ7FMd3Kt5XbqOgInkp NCorYK0v7Nk1SJIqsHXg== Received: by 10.143.153.18 with SMTP id f18mr887292wfo.114.1307302640169; Sun, 05 Jun 2011 12:37:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.44.9 with HTTP; Sun, 5 Jun 2011 12:37:00 -0700 (PDT) In-Reply-To: References: From: Joshua Marantz Date: Sun, 5 Jun 2011 15:37:00 -0400 Message-ID: Subject: Re: Vary:User-Agent, best practices, and making the web faster. To: "modules-dev@httpd.apache.org" Content-Type: multipart/alternative; boundary=001636e0a59e7b354504a4fc1d28 X-System-Of-Record: true --001636e0a59e7b354504a4fc1d28 Content-Type: text/plain; charset=ISO-8859-1 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. -Josh 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. > --001636e0a59e7b354504a4fc1d28--