in Using jQuery • 5 years ago
I am trying to use the hosted version of jQuery in a userscript, but the only way I am able to do so is by loading it using an xmlhttpRequest (More details here). Since xmlhttpRequest restricts access using the same-origin policy I would need to either host it on the same domain as the website (not feasible for a user-script) or use a CDN that includes the
header defined by Cross-Origin Resource Sharing. Is there any way to change the code.jquery.com CDN so that it will set this header and allow cross-origin access to jQuery?