Created
December 4, 2020 09:31
-
-
Save abha57/9d5983cb7425b360fdfb3a6efcde709b to your computer and use it in GitHub Desktop.
HTML attribute: crossorigin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for CORS, defining how the element handles crossorigin requests, | |
| anonymous CORS requests for this element will have the credentials flag set to 'same-origin'. | |
| By default (that is, when the attribute is not specified), CORS is not used at all. The "anonymous" keyword means that there will be no exchange of user credentials via cookies, client-side SSL certificates or HTTP authentication. | |
| Example: crossorigin with the script element | |
| You can use the following <script> element to tell a browser to execute the https://example.com/example-framework.js script without sending user-credentials. | |
| <script src="https://example.com/example-framework.js" crossorigin="anonymous"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment