Resource Loading
crossorigin="anonymous"
Requests CORS fetching with same-origin credentials mode, so cross-origin credentials are not sent. The server must permit the requesting origin when CORS applies; this is not a way to bypass origin restrictions. CORS settings attribute on resource elements including img, script, link, audio and video. Empty or invalid means anonymous; missing behavior depends on the resource type. Example requires a resource with appropriate CORS response headers.
Formal Syntax & Structure
html syntaxhtml
crossorigin="anonymous"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| crossorigin | keyword | Requests CORS fetching with same-origin credentials mode, so cross-origin credentials are not sent. The server must permit the requesting origin when CORS applies; this is not a way to bypass origin restrictions. |
Working Example
Example Snippethtml
<img src="https://example.com/image.png" alt="Example asset" crossorigin="anonymous">