Choosing a Public Frontend CDN for Projects in China: jsDelivr, unpkg, cdnjs, and Domestic Mirrors
cdnping · 2026-10-17
Public CDNs are convenient, but you don't control their availability. When choosing one for a project in China, weigh speed, stability, and "what if it suddenly stops working one day."
Main options
- jsDelivr: Covers npm and GitHub with strong global performance; its availability in mainland China has fluctuated repeatedly in the past,
fastly.jsdelivr.netand other backup domains also perform differently. - unpkg, cdnjs: Mostly overseas nodes; access from China depends on the quality of cross-border routes.
- npmmirror, BootCDN, Staticfile, 360 frontend static asset libraries: Nodes inside China, usually faster for domestic users, but with narrower coverage and slower updates than jsDelivr.
Actual speed varies by carrier; refer to CDN speed rankingover the past 7 days, broken down by China Telecom, China Unicom, and China Mobile, as the reference.
Recommendations for production
- Self-host critical assets.Files required for the first screen, such as frameworks and core styles, should be bundled into your own site or hosted on your own CDN.
- pin the version number.Citation
vue@3.4.21rather thanvue@3, to avoid cache misses and unexpected upgrades. - Add SRI.Add to external scripts:
integrityattribute to prevent tampering. - Have a fallback ready.If the primary CDN fails to load, load again from a backup CDN or a local path:
<script src="https://cdn.jsdelivr.net/npm/vue@3.4.21/dist/vue.global.prod.js"></script>
<script>window.Vue || document.write('<script src="/vendor/vue.global.prod.js"><\/script>')</script>
When you need to accelerate your own business resources, a public CDN isn't the right fit. Take a look at cdnping Edge.
Try it yourself
View frontend CDN speed rankings →Reading is good; testing it yourself is better.
Keep reading
- Native IP vs. Broadcast IP: Differences, How to Tell, and Common Misconceptions
- DNS leaks and WebRTC leaks: how they work, how to check, and how to fix them
- What Is Split Routing: Why Different Websites See You in Different Countries
- Calling AI Model APIs from Mainland China: Latency, Reachability, and Choices