- From: Roy Fielding <fielding@beach.w3.org>
- Date: Tue, 15 Aug 1995 13:16:58 -0400
- To: Lou Montulli <montulli@mozilla.com>
- Cc: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
>I've been getting lots of bug reports due to corrupted or out dated >caches. I would like to propose an extension to the If-modified-since >header to improve the situation. I'd like to start sending > >If-modified-since: DATE; size=SIZE > >The addition of size=SIZE informs the server of the current size of >the document cached by the client. The size acts as a checksum, >if the size of the file to be served is different than the >size given in the If-modified-since header than a 304 should >not be returned. In general, I think the idea of giving servers more information from which to make a decision is a good one. However, in order to be workable, it needs to be the information as delivered by the server (i.e., if it is based on length, the client must calculate the length as it is being received, prior to any local-filesystem-specific writes). For HTTP/1.1, we can just specify Content-Length MUST be accurate. Given that, the client can determine whether or not it has the full data and adjust its behavior accordingly. The same goes for MD5 and CRC -- the server can send those as headers (or footers, in the case of chunked messages) and the cache can use them to check for validity. This places the higher processing burden on the clients, where it belongs. At the same time, we can specify that IMS may contain additional parameters for each of the Content-* headers that are applicable, and the server may also use those for determining the correct response. That means "length" instead of "size" -- there's no sense in using a different name for the same thing. NOTE: The reason you have been getting lots of bug reports due to corrupted or out of date caches is because of a bug in Navigator. When the user requests a "Reload" of a URL, the user agent should add Proxy: no-cache and must not include an If-Modified-Since header. Navigator 1.1N sends the no-cache directive, but also sends IMS. Fix that and you won't get any more bug reports about cache corruption problems, since the user will be in control of their cache. ....Roy T. Fielding Department of ICS, University of California, Irvine USA Visiting Scholar, MIT/LCS + World-Wide Web Consortium (fielding@w3.org) (fielding@ics.uci.edu)
Received on Tuesday, 15 August 1995 10:17:44 UTC