New issue
Advanced search Search tips

Issue 770205 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 740886
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

script type=module and link rel=preload do not cache match, thus loading the file multiple times

Reported by samcc...@gmail.com, Sep 29 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
index.html

<html>
    <link rel="preload" as="script" href="magic.js"/>
    <link rel="preload" as="script" href="index.js"/>
    <body></body>
    <script type="module" src="index.js"></script>
</html>

index.js
import {magic} from './magic.js'
magic();

magic.js
export function magic() {
    console.log('magic!');
}

look at the network panel

What is the expected behavior?
the scripts are only loaded once (link rel preload tags)

What went wrong?
the scripts are loaded multiple times

Did this work before? N/A 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: OS X 10.12.5
Flash Version:
 
Screen Shot 2017-09-29 at 4.54.45 PM.png
194 KB View Download
I believe this was fixed recently. Can you retry in canary?
Mergedinto: 652228
Status: Duplicate (was: Unconfirmed)
Fixed in m62.

Comment 3 by samcc...@gmail.com, Sep 29 2017

reproduces in 63.0.3226.0 
Components: -Blink Blink>Network
Status: Unconfirmed (was: Duplicate)
Summary: script type=module and link rel=preload do not cache match, thus loading the file multiple times (was: script type module and link rel preload do not cache match thus loading the file multiple times.)
Cc: yhirano@chromium.org
Components: -Blink>Network Blink>Loader
Owner: ksakamoto@chromium.org
Sakamoto-san, can you take a look?
Mergedinto: -652228 740886
Status: Duplicate (was: Unconfirmed)
This is still an issue, tracked at  bug 740886 .

Sign in to add a comment