Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS from CDN with integrity loads twice

Tags:

css

cdn

Is it normal for integrity and crossorigin to make stylesheets appear to load twice in Chrome inspector?

I am using this:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

when dropping the integrity and crossorigin attribute it only loads once. If it is not why could it be happening?

like image 851
Håkan KA Avatar asked Mar 07 '17 13:03

Håkan KA


1 Answers

I found some info about this issue here, if you're still looking.

The integrity attribute for link elements has not yet been implemented and there’s an open spec issue about it. This means the presence of any integrity metadata will currently discard preloaded resources. In the wild, it can also result in duplicate requests where you have to make a trade-off between security and performance.

like image 176
zenofewords Avatar answered Oct 31 '22 01:10

zenofewords