Cross-Site Script Inclusion

Public preview

Want everyone on your software team to learn this? Free 14-day trial.

Train my team
cross-domain-loading.js
JavaScript
/**
 * Load in a JavaScript library from another origin.
 */
fetch('https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.js').then((response) => {
  // This will succeed because browsers will allow
  // JavaScript to be loaded from other origins.
});