Skip to content
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

Accept header for prefetch #1485

Merged
merged 10 commits into from
Jan 17, 2023
Merged
Changes from all commits
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
12 changes: 9 additions & 3 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,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>`.
noamr marked this conversation as resolved.
Show resolved Hide resolved


<h4 id=statuses>Statuses</h4>

Expand Down Expand Up @@ -4189,16 +4192,19 @@ the request.
<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