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

Accept header for prefetch #1485

merged 10 commits into from
Jan 17, 2023

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Sep 6, 2022

Together with whatwg/html#8111

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorial suggestion: it'd probably be best to <dfn> the "document Accept header value" (or similar name) as a constant, somewhere out in https://whatpr.org/fetch/1485.html#miscellaneous . Defining it as a per-algorithm variable doesn't seem necessary.

fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
fetch.bs Show resolved Hide resolved
@annevk
Copy link
Member

annevk commented Nov 28, 2022

Looking at the HTML issue I think we might have to resolve w3c/resource-hints#74 as part of this issue, though it depends a bit on where the header needs to be exposed.

fetch.bs Outdated Show resolved Hide resolved
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 13, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 13, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was done for prefetch (and should have been done for the frame accept header).

For now CORS prefetches remain untouched, as changing them to the >128bytes frame accept headers would cause incompatibility due to a CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 13, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was done for prefetch (and should have been done for the frame accept header).

For now CORS prefetches remain untouched, as changing them to the >128bytes frame accept headers would cause incompatibility due to a CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 14, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was done for prefetch (and should have been done for the frame accept header).

For now CORS prefetches remain untouched, as changing them to the >128bytes frame accept headers would cause incompatibility due to a CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 14, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 14, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 15, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 15, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 15, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4069726
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Auto-Submit: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1083806}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 15, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4069726
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Auto-Submit: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1083806}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 15, 2022
Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4069726
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Auto-Submit: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1083806}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 22, 2022
…ches., a=testonly

Automatic update from web-platform-tests
Use the frame `Accept` header for prefetches.

Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4069726
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Auto-Submit: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1083806}

--

wpt-commits: 9eb3b189dae1f06fed09df71442227527b860c6b
wpt-pr: 37469
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Jan 3, 2023
…ches., a=testonly

Automatic update from web-platform-tests
Use the frame `Accept` header for prefetches.

Special-casing prefetches makes it so that `Vary: Accept`
makes the browser erroneously reject the prefetched response.

Also changed the SXG ?q= value for the frame accept header, as it was
done for prefetch (and should have been done for the frame accept
header).

For now CORS prefetches remain untouched, as changing them to the
>128bytes frame accept headers would cause incompatibility due to a
CORS-preflight requirement.

This was previously unspecified,
See whatwg/fetch#1485

Bug: 626081
Change-Id: I2c99f4f1abd2556fdf456d877588b346a22fd677
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4069726
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Auto-Submit: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1083806}

--

wpt-commits: 9eb3b189dae1f06fed09df71442227527b860c6b
wpt-pr: 37469
@noamr
Copy link
Contributor Author

noamr commented Jan 13, 2023

@annevk all checkboxes are ticked.

@noamr
Copy link
Contributor Author

noamr commented Jan 13, 2023

Looking at the HTML issue I think we might have to resolve w3c/resource-hints#74 as part of this issue, though it depends a bit on where the header needs to be exposed.

That's resolved in #1576

fetch.bs Show resolved Hide resolved
fetch.bs Outdated
@@ -4189,16 +4191,20 @@ the request.
<ol>
<li><p>Let <var>value</var> be `<code>*/*</code>`.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a newline too many.

fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
noamr and others added 5 commits January 13, 2023 14:33
Co-authored-by: Anne van Kesteren <[email protected]>
Co-authored-by: Anne van Kesteren <[email protected]>
Co-authored-by: Anne van Kesteren <[email protected]>
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with the nit commit I pushed. (Once the HTML PR is approved I will merge this.)

@annevk annevk added topic: html do not merge yet Pull request must not be merged per rationale in comment and removed do not merge yet Pull request must not be merged per rationale in comment labels Jan 16, 2023
@annevk annevk merged commit a5560d2 into whatwg:main Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants