Closed Bug 2055211 Opened 1 month ago Closed 1 month ago

Don't cache HTTP errors in the module map

Categories

(Core :: JavaScript Engine, enhancement, P3)

Firefox 154
enhancement

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
relnote-firefox --- 155+
firefox155 --- fixed

People

(Reporter: yoav, Assigned: allstars.chh)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Steps to reproduce:

The current spec behavior doesn't allow developers to retry failed module imports, as the failure result (either an HTTP error or a network failure) gets cached.

Expected results:

https://github.com/whatwg/html/pull/10327 fixes that. Browsers should implement that change

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core
Component: Networking → JavaScript Engine

I assume the fix should be around js/loader/ModuleLoaderBase.cpp, so changing the component to JS.
Feel free to correct me if I am wrong. Thanks.

Yoshi: is this the right component for this one, or should we redirect this elsewhere?

Blocks: sm-modules
Severity: -- → N/A
Flags: needinfo?(allstars.chh)
Priority: -- → P3
Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)

Don't cache modules with HTTP errors, this allows devs to retry the imports if
it was failed due to network failure.

Make sure the <script> is inserted after <link rel="modulepreload"> is done,
so the result would be consistent.

Otherwise the <script> might also be preloaded by the speculative parser and
will join a single in-flight fetch with the <link>.

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61626 for changes under testing/web-platform/tests

Upstream PR merged by moz-wptsync-bot

Added to the Fx155 relnotes.

QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: