HTML - crossorigin attribute (CORS policy)

> (World Wide) Web - (W3|WWW) > HyperText markup Language (HTML)

1 - About

crossorigin is an attribute that set the mode of the request to an 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.

Advertising

3 - Syntax

crossorigin=value

where value is one of:

Doc

4 - 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:

5 - Documentation

Advertising