What is the HTML crossorigin attribute ? (CORS policy)

About

crossorigin is an attribute that set the mode of the request to an HTTP CORS Request.

Its value defines further the CORS policy.

It can be used on every html elements that fetch resources from a cross-origin Url.

Example

With the script element

<script 
   src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" 
   integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" 
   crossorigin="anonymous" 
   defer="true">
</script>

where:

Syntax

<tag crossorigin=value/>

where:

If the attribute is missing, the CORS request has the No CORS mode.

1)

Documentation


Powered by ComboStrap