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

jakearchibald approved this pull request.

Aside from the nits, I'm happy with this. I agree that "no-cache local only flag" is a confusing name, but I can't think of a better one.

Maybe "prevent no-cache cache-control header modification flat"? It's a bit long, but it says what it does.

> @@ -1896,6 +1908,16 @@ is a <a>filtered response</a> whose
  <li><p>Return <var>newResponse</var>.
 </ol>
 
+<p>A <dfn export id=concept-fresh-response>fresh response</dfn> is a <a for=/>response</a> where

Remove "where"

> @@ -1404,10 +1407,16 @@ Unless stated otherwise, it is unset.
 <div class="note no-backref">
  <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]]
+  <dd><a for=/>Fetch</a> will inspect the HTTP cache on the way to the network:
+  <ol>
+   <li>If the HTTP cache contains a matching <a>fresh response</a> it will be returned.
+   <li>If the HTTP cache contains a matching <a>stale-while-revalidate response</a> it will be returned,
+   and a conditional network fetch will be made to update the entry in the HTTP cache.
+   <li>If the HTTP cache contains a matching <a>stale response</a>, a conditional network will be created
+   and returned.
+   <li>Otherwise, a non-conditioanl network fetch will be returned.

"conditional"

-- 
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-211744386

Received on Thursday, 7 March 2019 12:14:49 UTC