To CDN or not to CDN?

Advantage of CDN: performance benefit, if the visitor to your webpage has already downloaded a copy of jQuery from the same CDN, it won’t have to be re-downloaded

Disadvantage of CDN: if the CDN is down then your website will not work!

So what is your advice? To CDN or not to CDN?

It doesn’t have to be one or the other - you can link to the copy on the CDN, but provide a local copy as a fallback.

Always use a CDN where you can is the advice, Google’s CDN is guaranteed to be online 100% of the time since they have so many cloud servers spread around the world. Personally I prefer to use CDN’s but the only downside is you have no control over the expiry headers and what not but that is not a bad thing, while you may not have control over headers for CDN hosted content you do have complete assurance that your users are getting the files from the closest server to their physical location on Earth.

If the CDN is in-house, it’s perfectly fine. If it’s leeching, my personal opinion is not to CDN. You don’t know where it’s been :slight_smile: