incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <>
Subject Re: How to configure HTTP caching headers?
Date Fri, 13 Feb 2009 14:44:00 GMT
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.

Christopher Lenz
   cmlenz at

View raw message