Examples demonstrating Cross-Origin Resource Sharing (CORS). View live.
Loading a javascript resource cross-domain (cross-origin) can be blocked by the browser due to so-called CORS policy. The behaviour of CORS is dependant on the server configuration, as well as the client code. This repo demonstrates cases where the browser would succeed in loading the javascript resource, and cases where it would not.
Client-side factors:
- html crossorigin attribute
- html type attribute
Server-side factor: