CSS from CDN with honor loads twice

Is it normal for integrity and crossorigin to force stylesheets to load twice in the Chrome inspector?

I use 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 discarding the integrity attribute and crossorigin, it loads only once. If it is not, can it happen?

+6
source share
1 answer

I found some information about this issue here if you are still looking.

The integrity attribute for link elements has not yet been implemented, and there is a problem with open specifications. This means that the presence of any integrity metadata currently discards preloaded resources. In the wild, this can also lead to duplicate requests when you need to compromise between security and performance.

+5
source

Source: https://habr.com/ru/post/1015564/


All Articles