W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] XMLHttpRequest: should UA pretend a 304 response is a 200?

From: Jim Ley <jim.ley@gmail.com>
Date: Fri, 8 Jul 2005 20:27:27 +0100
Message-ID: <851c8d3105070812275abd0121@mail.gmail.com>
On 7/8/05, Hallvord Reiar Michaelsen Steen <hallvord at hallvord.com> wrote:
> This may imply that a client with a cached document
> should return a status 200 when the requested document matches one in
> the cache (whether or not the UA has checked with the server if the
> resource is current).

I wouldn't be against this, if the resource is cacheable, then I'm
happy that what comes back could be a 200 or a 304, all my
implementations, and indeed any situation I can imagine where knowing
a 304 on the client is for resources that are "must-revalidate", if
it's just naturally cacheable, I'm not sure the fact it's been checked
for freshness is relevant.

Consider a cache which updates itself every 20 minutes for a resource
(without any request from the user agent), first time it gets a 200,
then each of the next requests it gets a 304, when the user agent then
makes a request to it, it's going to return the resource with 200,
that's reasonable.
So yes, I would be happy with the above interpretation, as long as a
specific request from the script, results in that value being what's
actually returned.  I'm happy that cache itself operates seperately
and simple freshness checks for a resource could stay as a 200

The arguments make sense.


Received on Friday, 8 July 2005 12:27:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC