Jumat, 08 Agustus 2014

3 CDN URL to load jQuery into Web Page from Google, Microsoft




jQuery is one of the most popular and powerful JavaScript library, but in
order to use it, you need to load into your webpage using standard HTML
. jQuery
site offers compressed and uncompressed copies of jQuery files, uncompressed
file is good for development and debugging, but can slow down page loading if
used in production. Compressed file saves bandwidth and improves performance in
production. In
this article, I
am sharing couple of CDN URLs from where you can directly load
jQuery files into
your web page, this includes popular Google CDN, jQuery CDN and Microsoft CDN.







List of URL to include jQuery library into web page



Ladoing jQuery from Google and Microsoft CDN URLHere 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


 








By the way if you have  put all
your jQuery code inside another JavaScript file, than make sure you put it
after jQuery.





Summary



Here are the three popular CDN URL to include jQuery library version
1.9.0 directly into your web page :






jQuery
CDN URL
           : http://code.jquery.com/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