Skip to content

Commit 2ae9df0

Browse files
committed
Take out partial content caching.
1 parent 4aa2432 commit 2ae9df0

File tree

1 file changed

+5
-40
lines changed

1 file changed

+5
-40
lines changed

fetch.bs

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,6 +3119,9 @@ steps:
31193119
<p class=note><i>CORS flag</i> is still a bookkeeping detail. As is
31203120
<i>authentication-fetch flag</i>.
31213121

3122+
<p class=note>Some implementations might support caching of partial content, as per <cite>HTTP
3123+
Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by browser caches.
3124+
31223125
<ol>
31233126
<li><p>Let <var>httpRequest</var> be null.
31243127

@@ -3345,7 +3348,7 @@ steps:
33453348

33463349
<li><p>Let <var>response</var> and <var>storedResponse</var> be null.
33473350

3348-
<li><p>Let the <var>revalidatingFlag</var> and <var>partialFlag</var> be unset.
3351+
<li><p>Let the <var>revalidatingFlag</var> be unset.
33493352

33503353
<li>
33513354
<p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is neither "<code>no-store</code>"
@@ -3369,11 +3372,6 @@ steps:
33693372
<li><p>If <var>storedResponse</var> requires validation (i.e., it is not fresh), then set the
33703373
<var>revalidatingFlag</var>.
33713374

3372-
<li><p>If <var>storedResponse</var> is not complete, then set the <var>partialFlag</var>.
3373-
3374-
<li><p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is "<code>only-if-cached</code>"
3375-
and the <var>partialFlag</var> is set, then abort these substeps.
3376-
33773375
<li>
33783376
<p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is "<code>force-cache</code>" or
33793377
"<code>only-if-cached</code>", then set <var>response</var> to <var>storedResponse</var> and
@@ -3382,14 +3380,8 @@ steps:
33823380
<p class=note>As mandated by HTTP, this still takes the `<code>Vary</code>` <a>header</a>
33833381
into account.
33843382

3385-
<li><p>If both the <var>revalidatingFlag</var> and <var>partialFlag</var> are set,
3386-
<a for="header list">append</a> `<code>If-Range</code>` with an appropriate value to
3387-
<var>httpRequest</var>'s <a for=request>header list</a>, as per the
3388-
"<a href=https://tools.ietf.org/html/rfc7233#section-3.2>If-Range</a>" chapter of
3389-
<cite>HTTP Range Requests</cite>. [[!HTTP-RANGE]]
3390-
33913383
<li>
3392-
<p>If the <var>revalidatingFlag</var> is set and the <var>partialFlag</var> is unset, then:
3384+
<p>If the <var>revalidatingFlag</var> is set, then:
33933385

33943386
<ol>
33953387
<li><p>If <var>storedResponse</var>'s <a for=response>header list</a>
@@ -3406,15 +3398,6 @@ steps:
34063398
<p class=note>See also the
34073399
"<a href=https://tools.ietf.org/html/rfc7234#section-4.3.4>Sending a Validation Request</a>"
34083400
chapter of <cite>HTTP Caching</cite> [[!HTTP-CACHING]].
3409-
3410-
<li><p>If the <var>revalidatingFlag</var> is unset and the <var>partialFlag</var> is set, then
3411-
<a for="header list">append</a> `<code>Range</code>` with an appropriate value to
3412-
<var>httpRequest</var>'s <a for=request>header list</a>, as per the
3413-
"<a href=https://tools.ietf.org/html/rfc7233#section-3.1>Range</a>" chapter of
3414-
<cite>HTTP Range Requests</cite>. [[!HTTP-RANGE]]
3415-
3416-
<li><p>If both the <var>revalidatingFlag</var> and <var>partialFlag</var> are unset, then set
3417-
<var>response</var> to <var>storedResponse</var>.
34183401
</ol>
34193402

34203403
<li>
@@ -3452,24 +3435,6 @@ steps:
34523435

34533436
</ol>
34543437

3455-
<li>
3456-
<p>If the <var>partialFlag</var> is set and <var>forwardResponse</var>'s
3457-
<a for=response>status</a> is <code>206</code>, run these substeps:
3458-
3459-
<ol>
3460-
<li>
3461-
<p>Update <var>storedResponse</var>'s <a for=response>header list</a> using
3462-
<var>forwardResponse</var>'s <a for=response>header list</a>, as per the
3463-
"<a href=https://tools.ietf.org/html/rfc7234#section-3.3>Combining Partial Content</a>" chapter
3464-
of <cite>HTTP Caching</cite> [[!HTTP-CACHING]].
3465-
3466-
<p class="note">This updates the stored response in cache as well.
3467-
3468-
<li><p>Set <var>response</var> to <var>storedResponse</var>.
3469-
3470-
</ol>
3471-
<!-- TODO: account for partial request failure -->
3472-
34733438
<li>
34743439
<p>If <var>response</var> is null, then run these substeps:
34753440

0 commit comments

Comments
 (0)