Crossorigin
The
crossorigin="anonymous"
attribute should always be added to external ressources so no user credentials are transmitted. By loading external files with a GET request, http user credentials are exchanged by default. If the source host is corrupted, an attacker could these details for attacks. <img class="hidden" src="https://firefox.com/set_hsts.gif"></img>
[https://www.mozilla.org/en-US/2121121121212.1/]
Integrity
The
integrity="sha256-..."
attribute should always be added to external file hosted on another domain, because an unexpected manipulation / corruption of the code can lead to session hijacking or similar script releated attacks. <img class="hidden" src="https://firefox.com/set_hsts.gif"></img>
[https://www.mozilla.org/en-US/2121121121212.1/]