Closed Bug 1798319 Opened 2 years ago Closed 1 year ago

Implement link rel=modulepreload in early hints

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: manuel, Assigned: zqianem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Module preloads are currently downloaded twice with rel=preload; as=script; type=module in early hint code. The way forward would be to implement the rel=modulepreload, this should be shared with the http link header preload code and html preload code.

Blocks: 1802501
No longer blocks: earlyhints

The aEarlyHintPreloaderId parameter for StartLoad/StartLoadInternal is changed
to be a member variable of ScriptLoadRequest instead so that an initiator type
of early hints can be set for module requests. Before, ModuleLoader would always
pass in a zero value for the id since ModuleLoaderBase has no concept of early
hints when it calls StartFetch.

As a prerequisite for early hints support, this commit also implements
modulepreload in link headers (Bug 1773056).

Assignee: nobody → zqianem
Status: NEW → ASSIGNED
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cafcb0a03c8
Implement modulepreload in early hints r=manuel,smaug,necko-reviewers,kershaw
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40746 for changes under testing/web-platform/tests
Regressions: 1840356
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.