Bug 194337 - nomodule scripts are fetched in some cases (with empty cache or in new tab)
Summary: nomodule scripts are fetched in some cases (with empty cache or in new tab)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Macintosh macOS 10.13
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-02-06 02:36 PST by Jakub G
Modified: 2019-09-24 11:17 PDT (History)
9 users (show)

See Also:

min repro HTML (702 bytes, text/html)
2019-02-06 02:36 PST, Jakub G
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub G 2019-02-06 02:36:16 PST
Created attachment 361285 [details]
min repro HTML


0. Open Safari (any version, including 12 or TP74; preferably 11+ to have `performance.getEntries()`)
1. Empty the browser cache (alt-cmd-e), or open a new tab (cmd-t)
2. Load https://jg-testpage.github.io/es-modules/module-nomodule/safari.html (also attached to this bug)
3. Observe that `nomodule.js` is listed as one of the loaded resources.


3. `nomodule` scripts should never be loaded in a modern browser.

Additional notes:

- Reproducible about 50% of the time in new tab
- Reproducible 100% of the time when when the cache is empty
- When there's no "traditional" script on top of HTML that has neither "nomodule" nor "type=module", I didn't repro (so far)

Other browsers

- Chrome: not affected
- Firefox: not affected
- Edge: affected, but it has bigger problems (it always loads nomodule)
Comment 1 Radar WebKit Bug Importer 2019-04-08 10:33:01 PDT
Comment 2 Ryosuke Niwa 2019-04-09 16:59:52 PDT
This is probably an issue with the HTML preloader.