How To Use jQuery CDN with a Local Fallback

 jQuery CDN with a Local Fallback
jQuery is a fast, popular JavaScript Library that has really small footprint. jQuery makes document handling, event processing, animation, and Ajax interactions very easy and has a short learning curve. The cross browser compatibility and abondance of free plugins for jQuery makes it one of the most used javascript libraries on web.

Popularity of jQuery has been so high that many CDNs have already started pre-hosting its versions. Though CDN hosting may not be always affordable, you may be willing to consider them if its free of cost and high performance.

Are you still hosting your own version of jQuery on your websites? There are already four CDNs available that host the jQuery library free of charge for public use:


You may be concerned that the free CDN may not provide you a good up-time or it may not be available in all regions your site is accessed. In this post we are just going to mention a simple trick for utilizing these free CDN with a local fallback copy to ensure your site is fully functional in case of any failure from these CDN to deliver your required content.

Continue Reading