Skip to content

Commit a5560d2

Browse files
noamrannevk
andauthored
Accept header for prefetch
Complements whatwg/html#8111. Co-authored-by: Anne van Kesteren <[email protected]>
1 parent c68b8e3 commit a5560d2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fetch.bs

+9-3
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,9 @@ downloads. This format of range header value can be set using <a>add a range hea
13211321
<a>implementation-defined</a> <a for=/>header value</a> for the `<code>User-Agent</code>`
13221322
<a for=/>header</a>.
13231323

1324+
<p>The <dfn>document `<code>Accept</code>` header value</dfn> is
1325+
`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`.
1326+
13241327

13251328
<h4 id=statuses>Statuses</h4>
13261329

@@ -4274,16 +4277,19 @@ the response. [[!HTTP-CACHING]]
42744277
<ol>
42754278
<li><p>Let <var>value</var> be `<code>*/*</code>`.
42764279

4280+
<li><p>If <var>request</var>'s <a for=request>initiator</a> is "<code>prefetch</code>", then set
4281+
<var>value</var> to the <a>document `<code>Accept</code>` header value</a>.
4282+
42774283
<li>
4278-
<p>A user agent should set <var>value</var> to the first matching statement, if any, switching
4279-
on <var>request</var>'s <a for=request>destination</a>:
4284+
<p>Otherwise, the user agent should set <var>value</var> to the first matching statement, if
4285+
any, switching on <var>request</var>'s <a for=request>destination</a>:
42804286
<!-- https://github.com/whatwg/fetch/issues/43#issuecomment-97909717 -->
42814287

42824288
<dl class=switch>
42834289
<dt>"<code>document</code>"
42844290
<dt>"<code>frame</code>"
42854291
<dt>"<code>iframe</code>"
4286-
<dd>`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`
4292+
<dd>the <a>document `<code>Accept</code>` header value</a>
42874293

42884294
<dt>"<code>image</code>"
42894295
<dd>`<code>image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5</code>`

0 commit comments

Comments
 (0)