Skip to content

Add Stale While Revalidate Handling #853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1882,13 +1882,13 @@ is a <a>filtered response</a> whose
</ol>

<p>A <dfn id=concept-fresh-response>fresh response</dfn> is a <a for=/>response</a> whose
<a href=https://tools.ietf.org/html/rfc7234#section-4.2.3>current age</a> is
within its <a href=https://tools.ietf.org/html/rfc7234#section-4.2.1>freshness lifetime</a>.
<a href=https://tools.ietf.org/html/rfc7234#section-4.2.3>current age</a> is within its
<a href=https://tools.ietf.org/html/rfc7234#section-4.2.1>freshness lifetime</a>.

<p>A <dfn id=concept-stale-while-revalidate-response>stale-while-revalidate response</dfn> is a
<a for=/>response</a> that is not a <a>fresh response</a>, and its
<a href=https://tools.ietf.org/html/rfc7234#section-4.2.3>current age</a> is within
the <a href=https://tools.ietf.org/html/rfc5861#section-3>stale-while-revalidate lifetime</a>.
<a for=/>response</a> that is not a <a>fresh response</a> and whose
<a href=https://tools.ietf.org/html/rfc7234#section-4.2.3>current age</a> is within the
<a href=https://tools.ietf.org/html/rfc5861#section-3>stale-while-revalidate lifetime</a>.

<p>A <dfn export id=concept-stale-response>stale response</dfn> is a <a for=/>response</a> is a
<a for=/>response</a> that is not a <a>fresh response</a> or a
Expand Down Expand Up @@ -4247,10 +4247,10 @@ Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by b
<p><a>In parallel</a>, perform <a for=main>main fetch</a> using
<var>revalidateRequest</var>.

<p class=note>Note the parallel 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. The parallel fetch will be issued in the context of
the browsing context so if it is destroyed the request will be aborted.
<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.
</ol>

<li>
Expand Down