Intent to ship: fetch priority

455 views
Skip to first unread message

Frédéric Wang

unread,
Sep 24, 2024, 9:07:02 AMSep 24
to dev-pl...@mozilla.org
As of Sep 24th 2024 we intend to turn fetch priority on by default. It
has been developed behind the network.fetchpriority.enabled preference.
Status in other browsers is shipped in Chrome and Safari.

Bug to turn on by default:
https://bugzilla.mozilla.org/show_bug.cgi?id=1854077

Standard: https://html.spec.whatwg.org/#fetch-priority-attribute

It does not seem this feature (or its old name "priority hints") was
previously discussed in an "Intent to prototype" thread, so I'm
providing relevant information below.

********************************************************************************

Summary:

The fetch priority attribute enables web developers to optimize resource
loading by specifying the relative priority of resources to be fetched
by the browser. It can be specified on script, link, img elements, on
the RequestInit parameter of the fetch() method and Link in HTTP
response headers. You can find further details at
https://web.dev/articles/fetch-priority ; note however that the details
of how fetchpriority affects internal browsers' priority or other
priority hints defined in HTTP is implementation-specific.
https://phabricator.services.mozilla.com/D222655 will add documentation
for Mozilla's own behavior.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1797715

Standards Body: WHATWG

Platform coverage: All platforms.

Preference: network.fetchpriority.enabled

DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1584663

Link to standards-positions discussion:
https://github.com/mozilla/standards-positions/issues/606 (Mozilla was
positive)

Other browsers:
  - Blink: Shipped since Chrome 102.
  - WebKit: Shiped since Safari 17.2.

web-platform-tests:

There are a few IDL tests for the fetchpriority attribute:
  - fetch/api/request/request-init-priority.any.js
  - html/dom/idlharness.https.html
  - html/embedded-content/the-img-element/attr-img-fetchpriority.html
  - html/scripting/the-script-element/attr-script-fetchpriority.html
  - html/semantics/the-link-element/attr-link-fetchpriority.html

We added extensive test coverage for Mozilla's implementation-specific
behavior here:
https://searchfox.org/mozilla-central/source/testing/web-platform/mozilla/tests/fetch/fetchpriority/

Reply all
Reply to author
Forward
0 new messages