Closed Bug 1504682 Opened 6 years ago Closed 6 years ago

<link rel=preload as=script> + <script> with same URL trigger duplicate HTTP requests

Categories

(Core :: Networking: HTTP, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1393540

People

(Reporter: jakub.g.opensource, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.30 Safari/537.36 Steps to reproduce: 1. Go to `about:config`, enable `network.preload` flag. 2. Open devtools, go to Network panel, toggle "disable cache" 3. Load https://jg-testpage.github.io/wpt/preload-before-script.html 4. Load https://jg-testpage.github.io/wpt/preload-after-script.html Actual results: In both [3] and [4], all 3 URLs that are used through <script> and <link rel=preload as=script> are loaded from network twice Expected results: In both cases, they should be loaded from network only once.
Cross-browser compat tests: - Chrome not affected - Safari not affected - Edge is affected by [4] but not by [3]. I opened https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19471670/ for Edge.
FWIW the same happens also for same-origin scripts: https://jg-testpage.github.io/wpt/preload-before-script-sameorigin.html
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
rel-preload implementation is not complete.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: