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

dtapuska commented on this pull request.



> -
-       <li>
-        <p>If the <var>revalidatingFlag</var> is set and <var>httpRequest</var>'s
-        <a for=request>cache mode</a> is neither "<code>force-cache</code>" nor
-        "<code>only-if-cached</code>", then:
+       <li><p>If <a for=request>cache mode</a> is "<code>default</code>" and
+        <var>storedResponse</var> is a <a>stale-while-revalidate response</a>, then:
+        <ol>
+         <li><p>Set <var>response</var> to <var>storedResponse</var>.
+         <li><p>Set <var>response</var>'s <a for=response>cache state</a> to "<code>local</code>".
+         <li><p>In parallel perform <a for=main>main fetch</a> using <var>request</var> with
+          <ul class=brief>
+          <li><p><a for=request>cache mode</a> set to "<code>no-cache</code>".
+          <li><p><a for=request>prevent no-cache cache-control header modification flag</a> set.
+          <li><p><a for=request>service-workers mode</a> set to "<code>none</code>".
+         </ul>

done

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

Received on Tuesday, 12 March 2019 16:18:05 UTC