Re: [whatwg/fetch] Add Stale While Revalidate Handling (#853)

I wonder if this should be limited only to safe methods, or is it implied by the current text?

Reg: SW I'm mostly convinced that revalidation requests should not go through SW, and thought that writing out my thinking here might be helpful: so I think there are at least two cases where SW sees the original request that result in async revalidation:

- SW sees the original request but does not handle (hence fallback)
- SW handles the request and gets a response from HTTP cache

I don't see any problem for skipping Service Workers for the first case. For the second case if the response was stale SW may store it in the Cache Storage and it may be reused because the async revalidation won't automatically update it.  But this could likely be a desirable behavior as the client of the revalidation request will be SW so its service-workers mode should be `none`, and manual expiration management is already needed for responses in Cache Storage with or without this feature.

(I could be missing something, and happy to stand corrected)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/853#issuecomment-458814145

Received on Wednesday, 30 January 2019 05:11:06 UTC