homeRelevant informationIntegrity and crossrigin fields in the link tag
Integrity and crossrigin fields in the link tag

crossorigin:

This enumeration property specifies whether CORS must be used when loading related pictures. Desirable values include the following two:

  • Anonymous: a cross domain request will be initiated (i.e. including origin: HTTP header). However, no authentication information will be sent (that is, cookies, X.509 certificates and HTTP basic authentication information will not be sent). If the server does not give the origin certificate (access control allow origin: HTTP header is not set), this picture will be polluted and restricted.

  • Use credentials: it will initiate a cross domain request with authentication information (sending cookies, X.509 certificates and HTTP basic authentication information) (i.e. including origin: HTTP header). If the server does not give the origin certificate (access control allow origin: HTTP header is not set), this picture will be contaminated and restricted

  • When this attribute is not set, the resource will not be loaded using CORS (i.e. the origin: HTTP header will not be sent), which will prevent its use in the element. If an illegal value is set, it will be regarded as anonymous

integrity

Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match.

Translation:

Sub resource integrity (SRI) is a security feature that allows browsers to verify that files they grab (for example, from a CDN) are passed without unexpected operations. It works by allowing you to provide an encrypted hash / hash that the obtained file must match.

Example:

<link rel="stylesheet" href=" https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css " integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="../../static/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
Software application: front end template download; Development design; SEO optimization; Browse the web offline. Note: this software is not a hacker program and cannot download background data!
Disclaimer: the service is used for personal learning, research or appreciation, as well as other non-commercial or non-profit purposes. However, it shall comply with the provisions of copyright law and other relevant laws, and shall not infringe the legitimate rights of this website and relevant obligees. The risks arising from the use of tools on this website have nothing to do with this software.
Copyright © 2019-2021 all rights reservedYue ICP Bei No. 19111427-2
News Doc Website topics