Features

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 and we'll figure something out!

If you are a package author, check our tips for package authors to make using your package as easy as possible.

npm CDN

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:

https://cdn.jsdelivr.net/npm/package@version/file

Load an exact version of a file:

https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js

Use a version range instead of an exact version:

https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
							https://cdn.jsdelivr.net/npm/jquery@3.1/dist/jquery.min.js
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 older version of the package instead of failing with a 404 error.

Load by tag (not recommended for production usage):

https://cdn.jsdelivr.net/npm/jquery@beta/dist/jquery.min.js

Omit the version completely or use "latest" to load the latest one (not recommended for production usage):

https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js
							https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js
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 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:

https://cdn.jsdelivr.net/npm/github-markdown-css@2.4.1/github-markdown.min.css
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 (currently not recommended). This file is always minified:
https://cdn.jsdelivr.net/npm/jquery@3.2.1
							https://cdn.jsdelivr.net/npm/jquery@3
							https://cdn.jsdelivr.net/npm/jquery
If the default file is not directly in the root directory of the package, using this feature may cause problems with relative imports, such as source maps, images, or font files referenced by the requested file.

Get a directory listing:

https://cdn.jsdelivr.net/npm/jquery@3.2.1/
							https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/

GitHub CDN

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 description and link to homepage.
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:

https://cdn.jsdelivr.net/gh/user/repo@version/file

Load an exact version of a file:

https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/dist/jquery.min.js

Use a version range instead of an exact version:

https://cdn.jsdelivr.net/gh/jquery/jquery@3.2/dist/jquery.min.js
							https://cdn.jsdelivr.net/gh/jquery/jquery@3/dist/jquery.min.js
If you use this feature 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 (not recommended for production usage):

https://cdn.jsdelivr.net/gh/jquery/jquery@latest/dist/jquery.min.js
							https://cdn.jsdelivr.net/gh/jquery/jquery/dist/jquery.min.js
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 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:

https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/src/core.min.js
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:

https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/
							https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/dist/

Combine multiple files

Our combine endpoint allows you to load several files from npm and GitHub endpoints in one request:

https://cdn.jsdelivr.net/combine/url1,url2,url3

All features that work for individual files (version ranges, minification, etc.) work here as well. All combined files come with source maps and can be easily used during development.

https://cdn.jsdelivr.net/combine/gh/jquery/jquery@3.2/dist/jquery.min.js,gh/twbs/bootstrap@3.3/dist/js/bootstrap.min.js
							https://cdn.jsdelivr.net/combine/npm/bootstrap@3.3/dist/css/bootstrap.min.css,npm/bootstrap@3.3/dist/css/bootstrap-theme.min.css
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.

WordPress CDN

Load any plugin from the WordPress.org plugins SVN repo:

https://cdn.jsdelivr.net/wp/project/tags/version/file

Load an exact version of a file:

https://cdn.jsdelivr.net/wp/wp-slimstat/tags/4.6.5/wp-slimstat.js

Load the latest version (not recommended for production usage):

https://cdn.jsdelivr.net/wp/wp-slimstat/trunk/wp-slimstat.js
Requesting the latest version is dangerous because a new version may come with breaking changes. Only do this if you really know what you are doing.

Custom endpoints

We provide custom endpoints for the following projects (contact us if you need one too):

Tips for package authors

  • make sure the provided files work in browser (use UMD)
  • use semver for versioning (this is enforced by npm but not by GitHub)
  • 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 setting a "default" file for each package. This file is displayed at the top of directory listings on our website and available under shorter URL on the CDN. The default file can be configured by setting one of the following fields in package.json, with jsdelivr having the highest priority:

  • jsdelivr
  • browser
  • main