什么是完整性和crossorigin属性? [英] What are the integrity and crossorigin attributes?
问题描述
< 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中以实现子资源完整性。
子资源完整性定义了一种机制用户代理可能会验证提取的资源是否已交付,而不会出现意外操作参考 a> 完整性属性允许浏览器检查文件源,以确保源代码已被操作时永不加载代码。 Crossorigin属性在使用'CORS'加载请求时存在,现在需要SRI检查,同源。 Bootstrapcdn recently changed their links. It now looks like this: What do the 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属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
有关crossorigin的更多信息
<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">
integrity
and crossorigin
attributes mean? How do they affect the loading of the stylesheet?