Intent to ship: rel=modulepreload

90 views
Skip to first unread message

Em Zhan

unread,
May 4, 2023, 1:57:53 PM5/4/23
to dev-pl...@mozilla.org
As of July 4 (Firefox 115 release day), I intend to turn rel=modulepreload on by
default on all platforms. It can be disabled using the network.modulepreload
preference. Status in other browsers is shipped — since Chrome 66 (April 2018)
and Safari Technology Preview 165 (March 2023).

Summary: rel=modulepreload prevents waterfalls in ECMAScript modules by allowing
dependencies to be fetched and parsed in parallel to the parent module,
improving page load performance[1]. It can also be used for subresource
integrity checks on those dependencies[2].

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1425310
Standard: https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload
Platform coverage: Android, Desktop
Preference: network.modulepreload (enabled by default)

Other browsers:
- Blink: shipped (https://chromestatus.com/feature/5762805915451392)
- WebKit: shipped
(https://developer.apple.com/documentation/safari-technology-preview-release-notes/stp-release-165#Web-API)

web-platform-tests:
- https://wpt.fyi/results/preload/modulepreload.html
- https://wpt.fyi/results/preload/modulepreload-as.html (pending wptsync PR)
- https://wpt.fyi/results/preload/modulepreload-sri.html (pending wptsync PR)
- https://wpt.fyi/results/preload/avoid-delaying-onload-link-modulepreload.html
- https://wpt.fyi/results/preload/avoid-delaying-onload-link-modulepreload-exec.html

[1] https://modulepreload-demo.vercel.app/
[2] https://guybedford.com/es-module-preloading-integrity#modulepreload
Reply all
Reply to author
Forward
0 new messages