What is CDN?
CDN Stands for Content Distribution Network or also called Content Delivery Networkis a group of computers placed at various points connected with network containing copies of data files to maximize bandwidth in accessing the data. In CDN a client access a copy of data nearer to the client location rather than all clients accessing from the one particular server. This helps to achieve better performance of data retrieval by client.
There are two leading CDNs available that hosts jQuery files.
Microsoft - To load jQuery from Microsoft AJAX CDN
jQuery file can be loaded from Microsoft AJAX CDN. For more details, go to http://www.asp.net/ajax/cdn. You will need to keep following tags in your page.
Google - To load jQuery from Google Libraries API
jQuery file can be loaded from Google CDN for more details, go to https://developers.google.com/speed/libraries/. You will need to keep following tag in your page.
Why to load jQuery file from CDN?
The possibility is that if more and more websites are using CDNs, the user might have already browsed some other web pages that is using CDNs jQuery file and that file may have into browser cache; so when user browse your page and you are also using CDNs file, the older cached version of jQuery file will be used. In this way your page will load faster as browser will not have to load the jQuery file for your page again.
What if the latest jQuery version is available and I am still referring older version of jQuery file from CDNs?
Do not worry about it, it?s a general promise made by CDNs that they will remain hosting the older version of the files on the same location where they had initially released; so even if newer version of the files are released, the older version remains there on the CDNs and your web page still works.