Skip to content

Commit

Permalink
Add Prefetch, Resource Hints and more Fetch keys (#2418)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <[email protected]>
  • Loading branch information
autonome and ddbeck authored Dec 19, 2024
1 parent c5d942d commit 4778d03
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 17 deletions.
9 changes: 0 additions & 9 deletions features/draft/spec/prefetch.yml

This file was deleted.

3 changes: 3 additions & 0 deletions features/fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ status:
compute_from: api.fetch
compat_features:
- api.Headers
- api.Headers.@@iterator
- api.Headers.Headers
- api.Headers.append
- api.Headers.delete
Expand All @@ -22,6 +23,7 @@ compat_features:
- api.Request
- api.Request.Request
- api.Request.Request.cross_origin_stripped
- api.Request.Request.init_keepalive_parameter
- api.Request.Request.init_referrer_parameter
- api.Request.Request.request_body_readablestream
- api.Request.Request.response_body_readablestream
Expand All @@ -36,6 +38,7 @@ compat_features:
- api.Request.credentials
- api.Request.credentials.default_same-origin
- api.Request.destination
- api.Request.duplex
- api.Request.formData
- api.Request.integrity
- api.Request.isHistoryNavigation
Expand Down
8 changes: 8 additions & 0 deletions features/fetch.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ compat_features:
# firefox_android: "44"
# safari: "10.1"
# safari_ios: "10.3"
- api.Headers.@@iterator
- api.Headers.entries
- api.Headers.keys
- api.Headers.values
Expand Down Expand Up @@ -360,6 +361,7 @@ compat_features:
# firefox_android: "133"
# safari: "13"
# safari_ios: "13"
- api.Request.Request.init_keepalive_parameter
- api.Request.keepalive
- api.fetch.init_keepalive_parameter

Expand Down Expand Up @@ -451,3 +453,9 @@ compat_features:
# chrome_android: "105"
# edge: "105"
- api.Request.Request.request_body_readablestream

# baseline: false
# support:
# chrome: "131"
# edge: "131"
- api.Request.duplex
6 changes: 6 additions & 0 deletions features/link-rel-dns-prefetch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: '<link rel="dns-prefetch">'
description: The `rel="dns-prefetch"` attribute for the `<link>` HTML element is a hint to the browser that the page or user is likely to request resources from another domain, so the browser should preemptively resolve DNS for the `href` value's domain.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-dns-prefetch
caniuse: link-rel-dns-prefetch
compat_features:
- html.elements.link.rel.dns-prefetch
17 changes: 17 additions & 0 deletions features/link-rel-dns-prefetch.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from: link-rel-dns-prefetch.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: ≤2020-01-15
baseline_high_date: ≤2022-07-15
support:
chrome: "46"
chrome_android: "46"
edge: ≤79
firefox: "3"
firefox_android: "4"
safari: "5"
safari_ios: "4.2"
compat_features:
- html.elements.link.rel.dns-prefetch
5 changes: 5 additions & 0 deletions features/link-rel-expect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: '<link rel="expect">'
description: The `rel="expect"` attribute for the `<link>` HTML element is a hint to the browser to block rendering until the element that the `href` value references is connected to the document and fully parsed.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-expect
compat_features:
- html.elements.link.rel.expect
11 changes: 11 additions & 0 deletions features/link-rel-expect.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Generated from: link-rel-expect.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "124"
chrome_android: "124"
edge: "124"
compat_features:
- html.elements.link.rel.expect
5 changes: 5 additions & 0 deletions features/link-rel-preconnect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: '<link rel="preconnect">'
description: The `rel="preconnect"` attribute for the `<link>` HTML element is a hint to the browser that the page or user is likely to request resources from another origin, so the browser should preemptively start a connection to the `href` value's origin.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-preconnect
compat_features:
- html.elements.link.rel.preconnect
17 changes: 17 additions & 0 deletions features/link-rel-preconnect.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from: link-rel-preconnect.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2020-01-15
baseline_high_date: 2022-07-15
support:
chrome: "46"
chrome_android: "46"
edge: "79"
firefox: "39"
firefox_android: "39"
safari: "11.1"
safari_ios: "11.3"
compat_features:
- html.elements.link.rel.preconnect
9 changes: 9 additions & 0 deletions features/link-rel-prefetch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: '<link rel="prefetch">'
description: The `rel="prefetch"` attribute for the `<link>` HTML element is a hint to the browser that the user is likely to navigate to a resource, so the browser should preemptively fetch and cache the resource.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-prefetch
caniuse: link-rel-prefetch
compat_features:
- api.PerformanceResourceTiming.deliveryType.navigational-prefetch
- html.elements.link.rel.prefetch
- http.headers.Sec-Purpose
- http.headers.Sec-Purpose.prefetch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated from: prefetch.yml
# Generated from: link-rel-prefetch.yml
# Do not edit this file by hand. Edit the source file instead!

status:
Expand All @@ -7,19 +7,21 @@ status:
compat_features:
# baseline: false
# support:
# chrome: "110"
# chrome_android: "110"
# edge: "110"
# firefox: "115"
# firefox_android: "115"
- http.headers.Sec-Purpose
# chrome: "8"
# chrome_android: "18"
# edge: "12"
# firefox: "2"
# firefox_android: "4"
- html.elements.link.rel.prefetch

# baseline: false
# support:
# chrome: "110"
# chrome_android: "110"
# edge: "110"
- http.headers.Sec-Purpose.speculationrules
# firefox: "115"
# firefox_android: "115"
- http.headers.Sec-Purpose

# baseline: false
# support:
Expand Down
14 changes: 14 additions & 0 deletions features/link-rel-preload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: '<link rel="preload">'
description: The `rel="preload"` attribute for the `<link>` HTML element requests resources, such as images or style sheets, that the page needs soon, so the browser may prioritize them for loading before rendering begins.
spec: https://html.spec.whatwg.org/multipage/links.html#link-type-preload
caniuse: link-rel-preload
status:
compute_from: html.elements.link.rel.preload
compat_features:
- html.elements.link.rel.preload
- html.elements.link.rel.preload.as-fetch
- html.elements.link.rel.preload.as-font
- html.elements.link.rel.preload.as-image
- html.elements.link.rel.preload.as-script
- html.elements.link.rel.preload.as-style
- html.elements.link.rel.preload.as-track
43 changes: 43 additions & 0 deletions features/link-rel-preload.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated from: link-rel-preload.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2021-01-26
baseline_high_date: 2023-07-26
support:
chrome: "50"
chrome_android: "50"
edge: ≤79
firefox: "85"
firefox_android: "85"
safari: "11.1"
safari_ios: "11.3"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2021-01-26
# baseline_high_date: 2023-07-26
# support:
# chrome: "50"
# chrome_android: "50"
# edge: ≤79
# firefox: "85"
# firefox_android: "85"
# safari: "11.1"
# safari_ios: "11.3"
- html.elements.link.rel.preload
- html.elements.link.rel.preload.as-fetch
- html.elements.link.rel.preload.as-font
- html.elements.link.rel.preload.as-image
- html.elements.link.rel.preload.as-script
- html.elements.link.rel.preload.as-style

# baseline: false
# support:
# chrome: "50"
# chrome_android: "50"
# edge: ≤79
# safari: "11.1"
# safari_ios: "11.3"
- html.elements.link.rel.preload.as-track
1 change: 1 addition & 0 deletions features/speculation-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ compat_features:
- html.elements.script.type.speculationrules.urls
- html.elements.script.type.speculationrules.where
- http.headers.Content-Security-Policy.script-src.inline-speculation-rules
- http.headers.Sec-Purpose.speculationrules
- http.headers.Speculation-Rules
- http.headers.Supports-Loading-Mode
- http.headers.Supports-Loading-Mode.credentialed-prerender
Expand Down
1 change: 1 addition & 0 deletions features/speculation-rules.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ compat_features:
# chrome_android: "110"
# edge: "110"
- http.headers.Content-Security-Policy.script-src.inline-speculation-rules
- http.headers.Sec-Purpose.speculationrules

# baseline: false
# support:
Expand Down
1 change: 1 addition & 0 deletions features/xhr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ compat_features:
- api.XMLHttpRequest.XMLHttpRequest
- api.XMLHttpRequest.abort
- api.XMLHttpRequest.abort_event
- api.XMLHttpRequest.authorization_removed_cross_origin
- api.XMLHttpRequest.error_event
- api.XMLHttpRequest.getAllResponseHeaders
- api.XMLHttpRequest.getAllResponseHeaders.header_names_lowercase
Expand Down
8 changes: 8 additions & 0 deletions features/xhr.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,11 @@ compat_features:
# safari: "10"
# safari_ios: "10"
- api.ProgressEvent.worker_support

# baseline: false
# support:
# firefox: "111"
# firefox_android: "111"
# safari: "16.1"
# safari_ios: "16.1"
- api.XMLHttpRequest.authorization_removed_cross_origin

0 comments on commit 4778d03

Please sign in to comment.