JQuery

What is the use of CDN?

What is the use of CDN?, someone asked me to explain?

A content delivery network (CDN) is a system of distributed servers(network) that deliver WebPages and other Web content to a user based on thegeographic locations of the user, instead of downloading and hosting jQuery yourself, is to include it from a CDN (Content Delivery Network).

Both Google and Microsoft hosted several different versions of jQuery and other JavaScript frameworks. It saves you from having to download and store the jQuery framework, but it has a much bigger advantage: Because the file comes from a common URL that other websites may use as well, chances are that when people reaches your website and their browser requests the jQuery framework, it may already be in the cache, because another website is using the exact same version and file. Besides that, most CDN's will make sure that once a user requests a file from it, it's served from the server closest to them, soyour Asian users won't have to get the file all the way from the US and so on.

     <script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

Post your comments / questions