Skip to content

jsDelivr Paths and URLs

Dmitriy Akulov edited this page Jun 8, 2015 · 5 revisions

jsDelivr Paths and URLs

jsDelivr URLs fall into 2 categories, static and dynamic.

Static

Static URLs are served by Nginx like a simple static file without any kind of processing. These files are stored on our origin server and are synced from the Github repo (with some exceptions). The homepage and API of jsDelivr list only static files.

Most often they follow the following structure:

//cdn.jsdelivr.net/{projectName}/{version}/{file}

Dynamic

Dynamic URLs describe all files served by jsDelivr that don't actually exist on the server. Some may be generated on-the-fly and some other are proxied from other locations.

All URLs using version aliasing are dynamic. They follow the same structure as "static" URLs so its a bit harder to detect them. All version aliased URLs have an extra HTTP header called X-Version containing the exact version of the file that was loaded.

Dynamic paths
  • /g/ A special parameter that enables users to combined multiple static projects and files into a single URL. All combined files must be "static" files, meaning that they need to physically exist on the server. More info

  • /wp/ is a proxied URL from the WordPress plugin repository. It was made to simplify the integration of jsDelivr into WP plugins and allow all WP devs to load their files much faster. There are limits to the type of files that are allowed to be loaded. jsDelivr also adds multiple HTTP headers like CORS, Timing-Allow-Origin and Vary.

  • /webjars/ is a proxied URL for the open source project Webjars. More info. All files and headers are proxied as is, nothing is changed or added. Point of contact @jamesward

  • /jspm/ is a proxied URL for the open source project jspm. All files and headers are proxied as is, nothing is changed or added. Point of contact @guybedford

Clone this wiki locally