[whatwg] XMLHttpRequest: should UA pretend a 304 response is a 200?
Jim Ley
jim.ley at gmail.com
Fri Jul 8 12:27:27 PDT 2005
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
certainly.
The arguments make sense.
Cheers,
Jim.
More information about the whatwg
mailing list