Håkan KA
Håkan KA

Reputation: 323

CSS from CDN with integrity loads twice

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?

Upvotes: 6

Views: 525

Answers (1)

zenofewords
zenofewords

Reputation: 452

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.

Upvotes: 5

Related Questions