crossorigin attribute
The HTML attribute that makes the browser fetch a resource using CORS, anonymous meaning without cookies.
In more detail
Its two values are anonymous, which sends no cookies, and use-credentials, which does. It is required for Subresource Integrity on files from other origins, and for font preloads, so the preload and the real request match.
Related terms
- Subresource Integrity — A browser check in which a script or stylesheet tag carries the expected hash of the file, and the browser refuses to use the file if it does not match.
- CORS — The browser rule set that decides whether web page code from one origin may read a response from a different origin.
- preload — A resource hint, <link rel="preload">, that makes the browser download a file needed for the current page right away at high priority.
Taught in
- CSRF Mitigations, SameSite Cookies And Subresource Integrity — Frontend Architecture & Web Platform
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform