What is jQuery CDN?

A content delivery network or content distribution network (CDN) is a large distributed system of servers deployed in multiple data centers across the Internet. The goal of a CDN is to serve content to end-users with high availability and high performance.

Which are the popular jQuery CDN?

Below is few popular jQuery CDNs.

  1.  Google.
  2.  jQuery.    
  3.  Microsoft

Advantages of CDN:

  1. Light weighted (minified files) therefore download faster on client side form these side.
  2. Reduced the load on the server.
  3. Most important benefit is it will be cached, if the user has visited any site which is using jQuery framework from any of these CDN.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/x.x.x/jquery.min.js"> </script>

<script type="text/javascript" src="http://code.jquery.com/jquery-x.x.x.min.js"> </script>

<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-x.x.x.min.js"> </script>


It’s always better to load the Js library from CDN, because of the above   given benefits, if in some case it fails (it will never happen; only very little chances are there) then pick from local folder.

Example is like:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/x.x.x/jquery.min.js">
<script type="text/javascript">
if(typeof jQuery == 'undefined') 
 document.write(unescape("%3Cscript src='Scripts/jquery.x.x.x.min.js' type='text/javascript'%3E%3C/script%3E")); 

More on jQuery

Leave a Reply

Your email address will not be published. Required fields are marked *