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

mayhemer commented on this pull request.



> +         "<code>no-cache</code>".
+
+         <li><p>Set <var>revalidateRequest</var>'s
+         <a for=request>prevent no-cache cache-control header modification flag</a>.
+
+         <li><p>Set <var>revalidateRequest</var>'s <a for=request>service-workers mode</a> set to
+         "<code>none</code>".
+
+         <li>
+          <p><a>In parallel</a>, perform <a for=main>main fetch</a> using
+          <var>revalidateRequest</var>.
+
+          <p class=note>This fetch is only meant to update the state of the HTTP cache and the
+          response will be unused until another cache access. The stale response will be used as the
+          response to current request. This fetch is issued in the context of a client so if it goes
+          away the request will be terminated.

@annevk Is this PR change only affecting the fetch() spec?  If so, then the Chrome implementation seems (after discussion on IRC with @dtapuska) reasonable and Gecko will likely end up doing the same/close thing.  

Hence, specifying the non-null client condition to respect SWR for fetch() initiated requests would make sense.

It seems to me pointless to discuss downloads, OCSP and other types of browser initiated internal requests.  Those can potentially benefit from SWR, independently from fetch() and don't need cancellation.


-- 
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#discussion_r278994451

Received on Friday, 26 April 2019 15:20:37 UTC