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

kinu commented on this pull request.

Some more comments. This starts to look nicer to me!

> @@ -1410,9 +1413,11 @@ Unless stated otherwise, it is unset.
  <dl>
   <dt>"<code>default</code>"
   <dd><a for=/>Fetch</a> will inspect the HTTP cache on the way to the network.
-  If there is a fresh response it will be used. If there is a stale response a conditional request
-  will be created, and a normal request otherwise. It then updates the HTTP cache with the response.
-  [[!HTTP]] [[!HTTP-SEMANTICS]] [[!HTTP-COND]] [[!HTTP-CACHING]] [[!HTTP-AUTH]]
+  If there is a fresh response it will be used. If there is a <a>stale response inside revalidate window</a>
+  and the request has the <a for=request>stale content mode</a> set it will be returned

Looks like stale content mode is no longer a boolean but has a value, this text needs to be updated as well?

> @@ -1526,6 +1531,10 @@ Unless stated otherwise, it is zero.
 which is "<code>basic</code>", "<code>cors</code>", or "<code>opaque</code>".
 Unless stated otherwise, it is "<code>basic</code>".
 
+<p>A <a for=/>request</a> has an associated <dfn export for=request id=stale-content-mode>stale content mode</dfn>,
+which is "<code>allow</code>", "<code>disallow</code>" or "<code>default</code>". Unless stated
+otherwise, it is "<code>default</code>".

What do we think about adding a new cache mode for that?  Currently it says the 'stale content mode' change is only applied for 'default', and other cache mode says something about cache behavior too, so it feels the mode can be one of the cache mode?

-- 
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#pullrequestreview-208361506

Received on Wednesday, 27 February 2019 07:21:50 UTC