- ASP.NET jQuery Cookbook(Second Edition)
- Sonal Aneel Allana
- 262字
- 2021-07-16 13:12:06
Understanding CDN for jQuery
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.
How to do it…
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:
Using CDNs for new releases
Note that CDNs may not have the latest files when new versions of the jQuery library are launched since it usually takes a couple of days for third-parties to update their files. In the case of new releases, always check the available version before downloading them.
How it works…
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.
See also
The Using NuGet Package Manager to download jQuery recipe
- HornetQ Messaging Developer’s Guide
- Magento 2 Development Cookbook
- 琢石成器:Windows環境下32位匯編語言程序設計
- JavaScript:Moving to ES2015
- Hands-On Full Stack Development with Go
- Access 2010數據庫應用技術(第2版)
- Python大學實用教程
- Arduino可穿戴設備開發
- JavaScript悟道
- Visual Basic語言程序設計基礎(第3版)
- Java從入門到精通(視頻實戰版)
- Developer,Advocate!
- Raspberry Pi Robotic Projects
- 數據結構與算法詳解
- 人件集:人性化的軟件開發