List of URL to include jQuery library into web page
Here is the list of couple of content delivery network, which provides jQuery hosting. You can use any of these URL to include or reference jQuery library into your page. As I said CDN networks improves loading of jQuery files by offering local hubs, as well as, since they are popular, it might be possible that your visitor has already downloaded jQuery from requested CDN. In first case it helps to load jQuery faster from closest server, while in second case it can leverage already downloaded version of jQuery, which means more faster response time. Here are three most popular content delivery network URLs for loading jQuery library in your web pages.
1. Google CDN URL to download jQuery
http:////ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js is the Google CDN url to download jQuery version 1.10.1, you just need to include that into src attribute of HTML <script> tag as shown below:
One of the worth noting thing is jquery.min.js, which is actual jQuery library, .min version is a compressed production version, which is without debug information to reduce size of jQuery, so that it can be loaded faster.
2. jQuery's CDN to download jQuery files
To use the jQuery CDN, just reference the jQuery library directly from http://code.jquery.com in the script tag, as shown below :
This will download jQuery version 1.10.1, but you are free to download earlier jQuery version including jQuery 1.4 or jQuery 1.6. visit http://code.jquery.com to see all available files.
jQuery version 1.10.0 : http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.0.min.js
jQuery version 2.0.0 : http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.0.min.js
Where to include jQuery - Head or Body
Here are the three popular CDN URL to include jQuery library version 1.9.0 directly into your web page :
Google CDN URL : http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
jQuery CDN URL : http://code.jquery.com/jquery-1.9.1.min.js
Microsoft CDN URL : http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js
That's all on this list of URL to download or include jQuery files into web page. I have shared mainly two ways of referencing jQuery files, from local file system of your web application, or directly downloading from one of the popular CDN network e.g. Google CDN. We have also seen benefit of including compressed version of jQuery file and using CDN network for hosting jQuery. Finally, we learned benefit of putting <script> tag at bottom of <body> tag instead of <head>, mainly faster loading of web page.