CDN – CONTENT DELIVERY NETWORK or CONTENT DISTRIBUTION NETWORK.
Web works by sending and receiving packets of information across various physical locations. The closer user is to your server, the faster the data get to them. CDN hosts multiple copies of files across different location. User’s will always have access to the one that is closest to them.
Yahoo’s Developer Network, Google and also others recommend use of CDN.
Yahoo has provided excellent best practices on speeding up website at URL http://developer.yahoo.com/performance/rules.html
Here one of the best practices is to always use content delivery network.
Since google copies of jQuery are very popluar, there is more probability that google’s CDN copy of jquery library is already loaded in visitor’s computer when they visit your website.
Google CDN source:
To use Google CDN, go to URL https://developers.google.com/speed/libraries/devguide
Here you can find links of popular libraries including jQuery. For Example, we can use highlighted link (refer above graphic) to include jQuery library in source code.
Couple of problems with Google CDN that you must know:
Though Google CDN are more reliable than most servers , if there is connection problem with CDN then your script that is linked to Google CDN will not load.
You might be developing code on local machine without connection to internet. If your code has link to jQuery libraries from CND then your script that depend on jQuery will not load. And you will not be able to test your code.
Fixes to this is, we can have links to Google or Other CDN but we should also have back-up copies of those libraries on local drives.