5 ms·
> Yes, loading 3rd party code can potentially lead to a XSS MITM attack (if you don't link via HTTPS). No, your local copy is not more robust than a globally di
by toast0 12y ago
> Yes, loading 3rd party code can potentially lead to a XSS MITM attack (if you don't link via HTTPS). No, your local copy is not more robust than a globally distributed CDN. No, loading yet another unique copy of jquery is not going to be faster than fetching the copy from a warm local cache.
Loading a local copy of jquery is probably not going to be more robust than a globally distributed CDN, but when it fails, it's probably going to be at the same time as the rest of your site, so it's not breaking anything that's not already broken. Who knows what's going to happen to the jQuery CDN in 10 years when jQuery is no longer in style, etc. What if they forget to renew the domain, or their domain registration is hijacked, etc.
- EvanPlaice 12y agoWell, I prefer cdnjs.com. It hosts a very comprehensive collection of js libraries, and it's hosted by CloudFlare so there's no risk of it going down.