JQuery CDN Fallback

Cashing on CDN hosts like Microsoft, Google etc., for referencing jQuery & similar libraries is good performance optimization solution particularly for rich interactive web applications .

However, consider a worst case scenario where CDN network is down or somehow not accessible. You must plan a fallback for the scenario where CDN network, of course, would be first preferred source of rendering followed by your local copy. At the same time, you also wants to avoid duplication on libraries sent to end-user.

Here’s a fallback approach to address this scenario:

  • Pingback: jquery from cdn - jQuery Solutions - Developers Q & A()