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>

Suggestions:

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> 
<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")); 
} 
</script>

More on jQuery

Leave a Reply

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

Explore More

How to Center a Popup Window on Screen

JavaScript window.open() method is used to open a popup window. This popup window will be placed in the center of the screen. This example creates the pop-up window without placing it into

How to hide URL in the popup window opened using window.open

If you are using below code to open a popup window in your web page, then address must be appearing in you pop up window and f you want to

window.showModalDialog is deprecated in Edge and Chrome

If you have a website being compatible with Edge/Chrome and in past it was only compatible with IE 11 and if you are using window.showModalDailog in your JavaScript code, then