What is CDN and what are the advantage of loading jQuery framework from CDN?
Sanjay Dixit
CDN is Content Delivery Network and it host the jQuery libraries online. Most popular CDNs are Google, Microsoft. If is always a good practice to use the CDN hosted jQuery in project instead of the offline one.
We have both advantage and disadvantage.Advantage is that If there is any update in Jquery cdn file you do not have to change anything automatically updated code came at your end.Disadvantage is- If cdn server is down then you will not get jquery reference file and Moreover it will take more time to load.If we add jquery file in our project and use that jquery file then it will increase your speed. If you are using cdn jquery file it will make your website slow if you are using multiple cdn files.
A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server. This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user, caching the contents of the page.. CDNs also provide protection from large surges in traffic. Organizations use content delivery network to accelerate static content, dynamic content, mobile content, ecommerce transactions, video, voice, games and so on. To overcome the CDN server down problem the best solution is to use both methods! Use the CDN first, and if it fails, load the local copy. Here is a technique: