VOOZH about

URL: https://www.geeksforgeeks.org/html/html-link-crossorigin-attribute/

⇱ HTML <link> crossorigin Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <link> crossorigin Attribute

Last Updated : 6 Jun, 2022

The HTML crossorigin Attribute in <link> element is used to specifying that supports the HTTP CORS request when fetching or loading the stylesheet or icon files from the third-party server.

Syntax:

<link crossorigin="anonymous | use-credentials">

Attribute Values:

  • anonymous: It has a default value. It defines a CORS request will be sent without passing the credentials information.
  • use-credentials: A cross-origin request will be sent with credentials, cookies, and certificate.

Example: Below code demonstrates the use of crossorigin Attribute with the <link> element. 

Output:

👁 Image

Supported Browsers:

  • Google Chrome 25 and above
  • Edge 79 and above
  • Firefox 18.0 and above
  • Opera 15.0 and above
Comment
Article Tags: