-
-
Notifications
You must be signed in to change notification settings - Fork 386
Description
What's the purpose for setting preload
rel after fetching the new style
When a css file updates, mini-css-extract will fetch the new link tag, and once done, it will set rel
as preload
and as
as css
.
https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/src/index.js#L1103-L1107
Is this just for disabling the new style rendering ?
Make a link whose href is the same with an already loaded link tag, will browser fetch the new style ?
I have a link tag whose href
is foo.css
, and the update happens fast, mini-css-extract creates an new link tag, whose href
is still foo.css
, but sometimes the browser doesn't make request at all, I assume that this is the default behavior for browsers: when you create a link tag whose href
is the same as an already loaded tag in a short time, browsers can assume these 2 tags are the same and do not make requests.
This happens usually when enable lazy compilation
I tried to find out in HTML spec and Dom spec but no luck, maybe is my carelessness. Still trying to make an repro.