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

Add Prefetch, Resource Hints and more Fetch keys #2418

Merged
merged 29 commits into from
Dec 19, 2024

Conversation

autonome
Copy link
Collaborator

@autonome autonome commented Dec 10, 2024

Draft, some of these need better home

Ok, a tangled web of features here. Easier to discuss in one place since they're interrelated.

Prefetch vs Speculation Rules

Speculation rules is broader. Prefetching is one purpose, but there can and will be more (eg prerender).

Developer POV seems to more be about "prefetch" than "speculation rules" as a singular thing, so I kept it split out - and that aligns w/ spec as well where it's separate.

Speculation Rules is more modern flexible approach that perhaps should be centered, but unless we're trying to actively shape how developers think about this, we should probably keep Prefetch as a standalone feature.

Resources hints - together or separate

A bunch of rel attribute values on the <link> tag related to performance, and collectively called resource hints in more than a few places, eg https://web.dev/learn/performance/resource-hints.

  • Spec doesn't treat them as a group
  • Caniuse has separate features for four of them

Bunched for now, feedback wanted on whether to group or not.

Update: modulepreload is separate feature already and a Caniuse feature so splitting this into separate features.

Authorization header removed in cross-origin redirects

I wiggled a bit on whether to put the authorization_removed_cross_origin keys all in their features or in Fetch, where that "feature" is specified.

  1. Calling it a "feature" is a bit of a stretch

  2. If you're a developer, you want to know whether network access method X supports feature Y

So I left the keys in the implementing network access method.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Dec 10, 2024
@autonome autonome changed the title Add more Fetch keys Add Prefetch, and more Fetch keys Dec 10, 2024
@autonome autonome marked this pull request as ready for review December 11, 2024 10:22
@autonome autonome marked this pull request as draft December 11, 2024 10:23
@autonome autonome changed the title Add Prefetch, and more Fetch keys Add Prefetch, Resource Hints and more Fetch keys Dec 11, 2024
@autonome
Copy link
Collaborator Author

Ready for review, with a few specific bits to note:

  • Caniuse for dns-prefetch starts at Chrome 4 but BCD has it starting at 46?!
  • api.Request.duplex... maybe should be a feature
  • two prefetch features, but are quite distinct so made them separate
  • no biggie but modulepreload was done earlier and now stands out with a different feature key format from the other link-rel-* features

@autonome autonome marked this pull request as ready for review December 13, 2024 11:25
@autonome autonome requested a review from ddbeck December 13, 2024 11:26
features/cors.yml Outdated Show resolved Hide resolved
features/fetch.yml Outdated Show resolved Hide resolved
features/fetch.yml Show resolved Hide resolved
features/link-rel-dns-prefetch.yml Outdated Show resolved Hide resolved
features/link-rel-dns-prefetch.yml Show resolved Hide resolved
features/link-rel-preconnect.yml Outdated Show resolved Hide resolved
features/link-rel-prefetch.yml Outdated Show resolved Hide resolved
features/link-rel-preload.yml Outdated Show resolved Hide resolved
features/prefetch.yml Outdated Show resolved Hide resolved
features/prefetch.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

I've re-reviewed and the only thing outstanding now is the link-rel-preload description (#2418 (comment)). This is very close!

@autonome
Copy link
Collaborator Author

@autonome autonome requested a review from ddbeck December 17, 2024 14:12
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

OK, I have one line comment with suggestions for the new preload description, but otherwise this is good. Please merge after you've considered my suggestion.

features/link-rel-preload.yml Outdated Show resolved Hide resolved
@autonome autonome merged commit 4778d03 into web-platform-dx:main Dec 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants