Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jsdelivr

> DevOps
Open source

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM

6.3K stars0 likes2 views
WebsiteGitHub

About

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM

jsDelivr - Open Source CDN


A global super-fast and production-focused CDN, tightly integrated with NPM and GitHub
with support for on-the-fly optimizations, ES modules, detailed download stats and more

www.jsdelivr.com

Website Repo · Public API · Blog · @jsDelivr · Discord


**We are looking for contributors.** Please check open issues in the above repos if you think you could help, or open a new one if you have an idea you'd like to discuss. jsDelivr is a free CDN for open-source files. We are tightly integrated with Github and npm, allowing us to automatically provide a reliable CDN service to almost every open-source project out there. We offer a stable CDN that can be used in production on popular websites with huge amounts of traffic. There are no bandwidth limits or premium features, and it's completely free to use. ### [How does it work - A simple infographic](https://www.jsdelivr.com/network/infographic) # Why jsDelivr? Ready for production -------------------- Our public CDN is built to be used in production by even the largest websites. Everything is optimized and constantly improved to offer all users maximum speed and uptime. Performance is monitored at all times, and we are always looking into new technologies and providers that may further improve our CDN. Downtime, timeouts, or slow responses are simply unacceptable. We do everything possible to ensure our CDN will NEVER break any websites, regardless of the use case. If a file is available via our CDN, we assume it's used in production and ensure it will continue to work no matter what. This includes dynamic endpoints such as `/npm/`, `/gh/` and `/combine/`. When a file is first accessed, it gets permanently stored in a reliable file system. This means that even if a npm package gets deleted or an existing file gets removed by a developer, jsDelivr will continue to serve the stored copy forever without breaking any websites or causing any issues. On top of that, we also do version fallback. This means that if a file used in version 1.0.1 is no longer available in 1.0.2 and a user requests the non-existent file, we will fall back to the previous 1.0.1 version and serve it instead of failing with a 404 error. Multi-CDN --------- Unlike the competition, jsDelivr uses multiple CDN providers, resulting in the best possible uptime and performance. We currently use [Cloudflare][8], and [Fastly][14]. If a CDN goes down, websites that use jsDelivr won't have any issues because all traffic will be instantly redirected to remaining operational providers. Smart Load Balancing -------------------- jsDelivr uses real user performance data (also known as RUM) to make its routing decisions. These metrics are gathered from hundreds of websites and are used in our load-balancing algorithm to make accurate decisions for serving content. All providers (CDNs and custom servers) are tested millions of times per day by real users from all over the world. Based on this information, jsDelivr knows what provider is the fastest for each user. Each user gets a unique response based on his or her location, ISP, and the providers' uptime in real-time. This system also responds immediately to performance degradation and downtime of providers. If a CDN is under a DDoS attack, and its performance drops in some locations, in a matter of seconds, the algorithm will pick up the change and start serving a different provider to all affected users. Failover -------- We have multiple layers of failover to protect our users from any downtime. We use 2 DNS providers at the same time. For jsDelivr to go down, both of these companies would have to go down at the same time. Both of our DNS providers monitor our load-balanced endpoint, and if they detect problems, they will automatically switch all traffic to a single CDN provider. Our load balancer monitors the uptime of all CDN providers using both RUM and synthetic data. If any of those detect downtime or performance degradation, that CDN provider will be removed immediately without any impact on our users. Our origin consists of multiple servers in different data centers. If a server goes down, the CDNs will automatically switch to using the remaining healthy servers. In total, we have one of the most resilient systems out there, ready to be used in production by even the biggest companies. China ---------------- jsDelivr has multiple locations close to Chinese urban centers to ensure low latency and high performance for all Chinese users. # Usage Documentation jsDelivr provides mirrors for npm, GitHub, WordPress plugins, and custom endpoints for several other projects with special requirements. If our regular endpoints don't work for your use case, [let us know](mailto:[email protected]) and we'll figure something out! If you are a package author, check our [tips for package authors](#Publishing-packages) to make using your package as easy as possible. #### Root endpoint is always `https://cdn.jsdelivr.net` npm ------ jsDelivr can instantly serve any file from any npm package in the public registry. New versions pushed to npm are instantly available via our CDN as well. No maintenance is required. If a package, version, or file gets removed from npm, then jsDelivr will continue to serve that file from our permanent storage without breaking any websites using it. We use a permanent S3 storage to ensure all files remain available even if npm goes down or a package is deleted by its author. Files are fetched directly from npm only the first time or when S3 goes down. ##### Load any project hosted on npm: ``` /npm/package@version/file ``` ##### Load exact version: ``` /npm/[email protected]/dist/jquery.min.js ``` ##### Use a version range instead of an exact version: ``` /npm/jquery@3/dist/jquery.min.js /npm/[email protected]/dist/jquery.min.js ``` --- **NOTE** If you use this feature and a file you requested is not available in the newest version of the package, the link will keep working thanks to our version-fallback feature. We'll continue to serve the file from the older version of the package instead of failing with a 404 error. --- ##### Load by tag (Not recommended for production usage): ``` /npm/jquery@beta/dist/jquery.min.js ``` ##### Omit the version completely or use "latest" to load the latest one (not recommended for production usage): ``` /npm/jquery@latest/dist/jquery.min.js /npm/jquery/dist/jquery.min.js ``` --- **NOTE** Requesting the latest version (as opposed to "latest major" or "latest minor") is dangerous because major versions usually come with breaking changes. Only do this if you really know what you are doing. --- ##### Add ".min" to any JS/CSS/SVG file to get a minified version - if one doesn't exist, we'll generate it for you. All generated files come with source maps and can be easily used during development: ``` /npm/[email protected]/github-markdown.min.css ``` --- **NOTE** Minifying a large file can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests. --- ##### Omit the file path to get the [default file](#configuring-a-default-file-in-packagejson). This file is always minified: ``` /npm/[email protected] /npm/jquery@3 /npm/jquery ``` ##### Get a directory listing: ``` /npm/[email protected]/ /npm/[email protected]/dist/ ``` GitHub ------ We recommend using npm for projects that support it for better UX - npm packages are searchable on our website, and package pages show additional useful information, such as descriptions and links to homepages. We use a permanent S3 storage to ensure all files remain available even if GitHub goes down or a repository or a release is deleted by its author. Files are fetched directly from GitHub only the first time or when S3 goes down. ##### Load any GitHub release, commit, or branch: ``` /gh/user/repo@version/file ``` ##### Load exact version: ``` /gh/jquery/[email protected]/dist/jquery.min.js /gh/jquery/jquery@32b00373b3f42e5cdcb709df53f3b08b7184a944/dist/jquery.min.js ``` ##### Use a version range instead of an exact version (only works with valid [semver versions][15]): ``` /gh/jquery/jquery@3/dist/jquery.min.js /gh/jquery/[email protected]/dist/jquery.min.js ``` --- **NOTE** If you use the version range and a file you requested is not available in the newest release, the link will keep working thanks to our version-fallback feature. We'll continue to serve the file from older release instead of failing with a 404 error. --- ##### Omit the version completely or use "latest" to load the latest one (only works with valid [semver versions][15]): (not recommended for production usage) *Falls back to the repository's default branch if there are no tagged releases.* ``` /gh/jquery/jquery@latest/dist/jquery.min.js /gh/jquery/jquery/dist/jquery.min.js ``` --- **NOTE** Requesting the latest version (as opposed to "latest major" or "latest minor") is dangerous because major versions usually come with breaking changes. Only do this if you really know what you are doing. --- ##### Add ".min" to any JS/CSS/SVG file to get a minified version - if one doesn't exist, we'll generate it for you. All generated files come with source maps and can be easily used during development: ``` /gh/jquery/[email protected]/src/core.min.js ``` --- **NOTE** Minifying a large file can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests. --- ##### Get a directory listing: ``` /gh/jquery/[email protected]/ /gh/jquery/[email protected]/dist/ ``` Combine multiple files ---------------------- Our combine endpoint allows you to load several files from npm and GitHub endpoints in one request: ``` /combine/url1,url2,url3 ``` All features that work for individual files (version ranges, minification, main modules) work here as well. All combined files come with source maps and can be easily used during development. Examples: ``` /combine/gh/jquery/[email protected]/dist/jquery.min.js,gh/twbs/[email protected]/dist/js/bootstrap.min.js /combine/npm/[email protected]/dist/css/bootstrap.min.css,npm/[email protected]/dist/css/bootstrap-theme.min.css ``` --- **NOTE** Combining large/many files can take several seconds. However, we store all generated files in our permanent storage, so this delay only applies to the first few requests. --- Publishing packages ------------------- All packages hosted on npm and tagged releases on GitHub are automatically available on jsDelivr. If you are a package author, here are a few tips to make using your package as easy as possible: - Use semver for versioning (this is enforced by npm but not by GitHub) - If a file listed as `main` in `package.json` isn't meant to be used in a browser, set a [`browser` or `jsdelivr` field](#configuring-a-default-file-in-packagejson) - If you distribute minified JS/CSS files, also include source maps for those files - If you don't want to provide minified files, it's fine - we'll handle that for you ### Configuring a default file in package.json For packages hosted on npm, we support serving "default" files with shorter URLs. The default file can be configured by setting one of the following fields in `package.json`, with `jsdelivr` having the highest priority: 1. `jsdelivr` 2. `browser` 3. `main` We will first attempt to locate a minified version of the file provided here (by removing the extension and looking for the same file `.min.js`)

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •Use semver for versioning (this is enforced by npm but not by GitHub)
  • •If a file listed as main in package.json isn't meant to be used in a browser, set a browser or jsdelivr field
  • •If you distribute minified JS/CSS files, also include source maps for those files
  • •If you don't want to provide minified files, it's fine - we'll handle that for you

> Tags

JavaScriptcdncdn-providersdistributionesm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理