Re: [fetch] Add "must-revalidate" to RequestCache enumeration (#165)

Maybe I misunderstand what the must-revalidate header does, so lets just talk about the desired behavior.

Basically, I want the code in the service worker's install event handle to get the same behavior that normal pages get when the refresh button is pushed.  The browser revalidates all resources in the cache, but if it gets a 304-not-changed it still uses the local http cache version.

As far as I can tell none of the current primitives do this.  I don't see anything that forces the revalidation requirement.  The "no-cache" value almost does the right thing, but it doesn't force the revalidation headers.

Maybe if we changed step 14.3 of Http-network-or-cache-fetch from:

> Otherwise, if httpRequest's cache mode is either "default" or "no-cache", and the response in the HTTP cache for httpRequest does require revalidation, modify httpRequest's header list with revalidation headers.

To something like:

> Otherwise, if either of the following conditions is true modify httpRequests header list with revalidation headers:
> * httpRequest's cache mode is "default" and the response in the HTTP cache for httpRequest requires revalidation
> * httpRequest's cache mode is "no-cache"

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/165#issuecomment-164796559

Received on Tuesday, 15 December 2015 15:22:35 UTC