Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 92628 invoked from network); 24 Oct 2007 12:07:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Oct 2007 12:07:09 -0000 Received: (qmail 53315 invoked by uid 500); 24 Oct 2007 12:06:46 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 53296 invoked by uid 500); 24 Oct 2007 12:06:46 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 53285 invoked by uid 99); 24 Oct 2007 12:06:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 05:06:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of solprovider@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 12:06:49 +0000 Received: by nf-out-0910.google.com with SMTP id c10so135941nfd for ; Wed, 24 Oct 2007 05:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=bgGB24LZEa785MLV0NLpaBYe14+kNzD4hvAbxJhFqz8=; b=TYdkqMF2FaQqsa5vf69b2Ik2SxEsZ0WJ3pd0GBjOWrURbhK/z/p2043bpUnWJKkrK1idoPq13BE/+YFdabHqZmMrgPdf5Oeoq7oUKbzSDYECVo4Az0ITZbmhRKUuCTVNbOJE/+D+cNC9DUcB2JqZfho0l7K1aEDG9HiHVzeHYXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=OidC5szI8Whd+bExbMEOUOSPFCshqkhBdi30QtKYZeMpT2qKr00Yu5iwjJiWSt7q5Q6o8KYshJ/ut6TFhIlGCl4TKuR6XZ/xsCdc6ztodTxB6dEM/ianicTiLUrUfZx1oxmV8zD310WKbz9q+BKVqGER8dszhc48jO8LMc6Voyc= Received: by 10.86.70.8 with SMTP id s8mr420886fga.1193227587752; Wed, 24 Oct 2007 05:06:27 -0700 (PDT) Received: by 10.86.97.5 with HTTP; Wed, 24 Oct 2007 05:06:27 -0700 (PDT) Message-ID: Date: Wed, 24 Oct 2007 08:06:27 -0400 From: solprovider@apache.org Sender: solprovider@gmail.com To: users@httpd.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: d5eea5a969c85991 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Avoiding conditional requests Check your browser settings: Internet Explorer 6.0 - Tools - Internet Options - General - Temporary Internet Files - Settings - Check for newer versions of stored pages: __ Every visit to the page __ Every time you start Internet Explorer __ Automatically __ Never Mozilla 1.7.3 - Edit - Preferences - Advanced - Cache - Compare the page in the cache to the page on the network: __ Every time I view the page __ When the page is out of date __ Once per session __ Never The server-specified expiration period should only affect MSIE's "Automatically" and Mozilla's "When the page is out of date" options. As a web developer, you are very likely to have set your browser to the top most-frequently-updated setting to force the appearance of changes from your current work (and may still sometimes need to manually clear the cache.) The "every time" settings will send the conditional request for every request while ignoring expiration datetimes. You can see the Expires header so you know the server is configured as you desire. Your browser must be configured to use the setting to prove your browser works as desired. solprovider On 10/24/07, uri_shaked@magicsoftware.com wrote: > I've been trying to improve my webapp's performance by telling Apache > [2.2.4] to force clients to cache static content using mod_expires. > I'm basically trying to avoid having the client browser resend the > 'if-modified' conditional request for the static content upon a refresh or a > revisit to the site, thus saving the round-trip time and having the page > presented straight from cache . For this, I've added the following lines to > my httpd.conf: > > LoadModule expires_module modules/mod_expires.so > ExpiresActive on > ExpiresDefault "access plus 2 hours" > ExpiresByType image/gif "access plus 7 days" > ExpiresByType image/jpeg "access plus 7 days" > ExpiresByType text/css "access plus 7 days" > ExpiresByType application/x-javascript "access plus 12 hours" > > The problem is that for some reason this doesn't seem to work, and the > browser [ie6] still sends the conditional requests, disregarding the > expiration directive. > here is an example HTTP traffic caputre (using Fiddler): > > First Request > > GET /Eip/Static/Images/Logos/siteLogo.gif HTTP/1.0 > Accept: */* > Referer: http://qcxp2/Eip/bin/ibp.jsp?ibpPage=HomePage& > Accept-Language: he > Proxy-Connection: Keep-Alive > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; > InfoPath.1; FDM; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) > Host: qcxp2 > Cookie: JSESSIONID=4662B8AA7EC6B9AE09258672CBDCE54C > > First Response > > HTTP/1.1 200 OK > Date: Wed, 24 Oct 2007 08:37:29 GMT > Server: Apache/2.2.4 (Win32) mod_jk/1.2.25 > Last-Modified: Mon, 17 Sep 2007 09:00:24 GMT > ETag: "8e5a-782-8f6da00" > Accept-Ranges: bytes > Content-Length: 1922 > Cache-Control: max-age=604800 > Expires: Wed, 31 Oct 2007 08:37:29 GMT > Connection: close > Content-Type: image/gif > > GIF89a] > > Second Request (the one that souldn't actually occur at all) > > GET /Eip/Static/Images/Logos/siteLogo.gif HTTP/1.0 > Accept: */* > Referer: http://qcxp2/Eip/bin/ibp.jsp?ibpPage=HomePage& > Accept-Language: he > Proxy-Connection: Keep-Alive > If-Modified-Since: Mon, 17 Sep 2007 09:00:24 GMT > If-None-Match: "8e5a-782-8f6da00" > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; > InfoPath.1; FDM; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) > Host: qcxp2 > Pragma: no-cache > Cookie: JSESSIONID=4662B8AA7EC6B9AE09258672CBDCE54C > > Second Response > > HTTP/1.1 304 Not Modified > Date: Wed, 24 Oct 2007 08:41:12 GMT > Server: Apache/2.2.4 (Win32) mod_jk/1.2.25 > Connection: close > ETag: "8e5a-782-8f6da00" > Expires: Wed, 31 Oct 2007 08:41:12 GMT > Cache-Control: max-age=604800 > > Any ideas? > Uri --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org