4 ms·
Interesting. Isn't the website just telling to load the script from a Google server (which could count as 3rd party) and execute it?
by hiddenfeatures 14y ago
Interesting. Isn't the website just telling to load the script from a Google server (which could count as 3rd party) and execute it?
- mjn 14y agoIt's loading from a 3rd party (with a 3rd-party HTTP request), but the script itself is run by the first party: scripts are owned by whichever page executes them, regardless of how that page conjured them up. That's why you can load jquery from a CDN without breaking lots of things, because jquery still "runs from" your domain, same as if it were hosted locally. Also a reason that you really need to trust the third-party host, because if you load malicious third-party JS, it runs from your domain.
- Nursie 14y agoThanks, that's a neat little explanation and cleared a couple of things up for me :)
- hiddenfeatures 14y agothanks for the cool explanation. That really filled in a few blanks in my understanding of the web.