The <crossorigin> attribute specifies how the browser should perform a CORS request for a resource loaded from a DIFFERENT origin (different domain, subdomain, protocol, or port). This matters when loading scripts, styles, images, fonts, or video from external servers. CORS (Cross-Origin Resource Sharing) is a mechanism that defines the rules for whether and how resources can be shared across different origins. The <crossorigin> attribute has two main values:
If you load a resource from the same origin (e.g., src="/..."), the <crossorigin> attribute has no effect. For a practical example, prepare an external JavaScript file on another domain or subdomain and include it in your HTML document with the appropriate <crossorigin> attribute.
Thank you for visiting! Adding privacy policy.
© 2024 All rights reserved.
Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.