A Content Delivery Network (CDN) hosts content for users through large distributed systems. The advantage of using a CDN is to improve the performance. When using a CDN to retrieve the jQuery library, if the files have been downloaded earlier, they will not be re-downloaded. This can help you improve the response time.
The following CDNs are available for jQuery files:
jQuery's CDN provided by MaxCDN
The Google CDN
The Microsoft CDN
The CDNJS CDN
The jsDelivr CDN
To include jQuery on a web page, the URL of the respective CDN can be used so that files can be directly served from the CDN instead of using the local copies. The following table summarizes the respective CDN URLs for jQuery files:
CDN |
URL |
---|---|
jQuery's CDN |
|
The Google CDN |
|
The Microsoft CDN |
|
The CDNJS CDN |
|
The jsDelivr CDN |
|
CDNs consist of servers situated in data centers in strategic locations across the globe. When a client requests a resource from a CDN, the server that is geographically closest to the client processes the request. These servers are also known as edge servers. In addition to this, edge servers have a caching mechanism to serve various assets. All this helps you improve the client's response time.