问题描述
Bootstrapcdn最近改变了他们的链接。它现在看起来像这样: < link href =https://maxcdn.bootstrapcdn.com/bootstrap/3.3。 5 / CSS / bootstrap.min.css
的rel = 样式表
完整性= SHA256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc = SHA512-dTfge / zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz / ixG7ArTxmDjLXDmezHubeNikyKGVyQ ==
crossorigin = 匿名 > ;
完整性
和 crossorigin
属性是什么意思?它们如何影响样式表的加载?
这两个属性都已添加到Bootstrap CDN中以实现。
子资源完整性定义了一种机制用户代理可能会验证提取的资源是否已交付,而不会出现意外操作
Bootstrapcdn recently changed their links. It now looks like this:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ=="
crossorigin="anonymous">
What do the integrity
and crossorigin
attributes mean? How do they affect the loading of the stylesheet?
Both attributes have been added to Bootstrap CDN to implement Subresource Integrity.
Subresource Integrity defines a mechanism by which user agents may verify that a fetched resource has been delivered without unexpected manipulation Reference
Integrity attribute is to allow the browser to check the file source to ensure that the code is never loaded if the source has been manipulated.
Crossorigin attribute is present when a request is loaded using 'CORS' which is now a requirement of SRI checking when not loaded from the 'same-origin'.More info on crossorigin
More detail on Bootstrap CDNs implementation
这篇关于什么是完整性和crossorigin属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!