Skip to content

Commit

Permalink
Accept header for prefetch
Browse files Browse the repository at this point in the history
Complements whatwg/html#8111.

Co-authored-by: Anne van Kesteren <[email protected]>
  • Loading branch information
noamr and annevk authored Jan 17, 2023
1 parent c68b8e3 commit a5560d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,9 @@ downloads. This format of range header value can be set using <a>add a range hea
<a>implementation-defined</a> <a for=/>header value</a> for the `<code>User-Agent</code>`
<a for=/>header</a>.

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


<h4 id=statuses>Statuses</h4>

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

<li><p>If <var>request</var>'s <a for=request>initiator</a> is "<code>prefetch</code>", then set
<var>value</var> to the <a>document `<code>Accept</code>` header value</a>.

<li>
<p>A user agent should set <var>value</var> to the first matching statement, if any, switching
on <var>request</var>'s <a for=request>destination</a>:
<p>Otherwise, the user agent should set <var>value</var> to the first matching statement, if
any, switching on <var>request</var>'s <a for=request>destination</a>:
<!-- https://github.com/whatwg/fetch/issues/43#issuecomment-97909717 -->

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

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

0 comments on commit a5560d2

Please sign in to comment.