Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 79531 invoked from network); 13 Feb 2009 14:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 14:44:35 -0000 Received: (qmail 68012 invoked by uid 500); 13 Feb 2009 14:44:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 67985 invoked by uid 500); 13 Feb 2009 14:44:32 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 67974 invoked by uid 99); 13 Feb 2009 14:44:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 06:44:32 -0800 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 cmlenz@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 Feb 2009 14:44:23 +0000 Received: (qmail invoked by alias); 13 Feb 2009 14:44:00 -0000 Received: from vpn.mediatis.de (EHLO [192.168.28.238]) [62.96.5.68] by mail.gmx.net (mp003) with SMTP; 13 Feb 2009 15:44:00 +0100 X-Authenticated: #2618757 X-Provags-ID: V01U2FsdGVkX19zj7cvz/xzf+LkrhdKoQSypf3TFK4HJMXAtF9bdV ikkIoCzHGUHo3F Message-Id: <95ED0E05-515D-4E67-A3FF-D25A7B5FAD44@gmx.de> From: Christopher Lenz To: user@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: How to configure HTTP caching headers? Date: Fri, 13 Feb 2009 15:44:00 +0100 References: X-Mailer: Apple Mail (2.930.3) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 X-Virus-Checked: Checked by ClamAV on apache.org On 13.02.2009, at 13:00, Vinay Sajip wrote: > Just taking my first steps with CouchDB. I notice that the HTTP > caching headers > currently put out cause IE (for example) to not display information > correctly in > Futon. It's easy to reproduce: I open windows in Firefox and IE > simultaneously, > do an update using Firefox (e.g. add a new document) and refresh the > IE window. > The updated document count is not shown. If I clear the browser > cache and try > again, the updated information is displayed. > > The HTTP header put out is > Cache-Control: must-revalidate > > which seems to me insufficient - for IE, at least. Is there way of > configuring > these headers, to for example > > Cache-Control: no-cache > Pragma: no-cache > Expires: some date in the past, or the same value as the Date: header This is due to extra-aggressive (and against the HTTP spec) caching that IE does on XMLHTTPRequests. A patch would need to do user agent sniffing to conditionally add the "cache: false" parameter to the jQuery ajax() invocations in jquery.couch.js (and maybe elsewhere). I wouldn't want to add this for all user agents, as it basically circumvents any caching for AJAX requests (even for not-craptastically-broken implementations), and thus would add quite a bit of unnecessary overhead. Cheers, -- Christopher Lenz cmlenz at gmx.de http://www.cmlenz.net/