Code Monkey home page Code Monkey logo

jsdelivr's Introduction

jsDelivr - Open Source CDN

jsdelivr-logo
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.

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, and Fastly.

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 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.

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. This file is always minified:
/npm/[email protected]
/npm/jquery@3
/npm/jquery
Get a directory listing:

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):
/gh/jquery/jquery@3/dist/jquery.min.js
/gh/jquery/[email protected]/dist/jquery.min.js

NOTE 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 (only works with valid semver versions): (not recommended for production usage)

Falls back to the master 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
  • 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). If we can't find one, we will minify ourselves.

Be advised that you must include the file extension in the values, for example:

"main": "./index" // this will NOT work
"main": "./index.js" // this is the correct way

For projects having both a JS and a CSS file, use one the above fields for JS and a style field for the CSS file (example).

Restrictions

  • Packages larger than 150 MB or single files larger than 20 MB (in the case of GitHub) are not supported by default. We recommend removing files that are not needed from your package when possible. If you need to set a higher limit for your package, open an issue in this repo.
  • HTML files are served with Content-Type: text/plain for security reasons.

WordPress

Our WordPress endpoint works for plugins and themes hosted in the WordPress.org plugin directory and Wordpress.org theme directory, and mirrors the WordPress.org plugins SVN repo.

Load any plugin from the WordPress.org plugins SVN repo:
/wp/project/tags/version/file
Load exact version:
/wp/wp-slimstat/tags/4.6.5/wp-slimstat.js
Load the latest version (not recommended for production usage):
/wp/wp-slimstat/trunk/wp-slimstat.js
Load any theme from the WordPress.org themes SVN repo:
https://cdn.jsdelivr.net/wp/themes/project/version/file
Load an exact version of a file:
https://cdn.jsdelivr.net/wp/themes/twenty-eightteen/1.7/assets/js/html5.js
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/wp/themes/twenty-eightteen/1.7/assets/js/html5.min.js

Caching

Our caching logic and headers are optimized for production use and apply to all non-custom endpoints.

  • Static Versions and commit hashes - Effectively forever. The caching headers are set for 1 year but we also permanently cache the files in our S3 storage. So all future requests that bypass the CDN will hit our S3 storage with no option or way to update the contents of that file.
  • Version aliasing - 7 days. This also includes latest versions. They are cached on our CDN for 7 days with the option to purge the cache using our API to speed up the release of your project to your users.
  • Branches - 12 hours.

In certain cases, purgeable files can get updated faster due to low-cache hit ratio or forced CDN purge from our side for maintenance reasons.

We use permanent S3 caching even with dynamic URLs, such as version aliasing, meaning once we download your tagged files, there is no way for you to update them. If there is a critical issue in your latest release the best course of action is to tag a new semver valid release with the fix and purge the CDN URLs using our purge API.

Purge cache

jsDelivr has an easy-to-use API to purge files from the cache and force the files to update. This is useful when you release a new version and want to force the update of all version-aliased users.

Please note:

  • It will not work for static files as explained above.
  • Valid semver releases must be used for purge to work
  • Rate-limiting applies to all users

To avoid abuse, access to purge is given after an email request (for now - [email protected]).

Custom CDN Hosting

We can work together and set up a custom configuration for your project. This way, you can have full control over your files and the ability to utilize the full power of jsDelivr.

This kind of custom hosting can be suitable for:

  • Binary hosting. Windows executable files and zips.
  • Frequently updated files.
  • Projects that can't follow jsDelivr file structure.
  • Some other use that will blow all of our minds.

Simply send an email to [email protected] with a request for more information.

Current OSS projects using custom configs:

Privacy Policy

cdn.jsdelivr.net

jsDelivr might use information about downloaded files to build download stats per project and per file.

jsDelivr does not store any user data and does not track any users in any way.

Here are the relevant policies of our CDN providers:

jsdelivr's People

Contributors

eltociear avatar fransallen avatar jimaek avatar jsdelivrbot avatar laozhoubuluo avatar martinkolarik avatar pencilnavigator avatar plan-do-break-fix avatar shelob9 avatar tjenkinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsdelivr's Issues

Looking for sponsors and contributors

jsDelivr is a non-profit project that heavily relies on sponsors and the community for help. Here are some stuff that we need. If someone can help or knows people that can help please let me know.

What we are looking for:

  • CDN Companies that can sponsor their services.
    • Custom CNAME and SSL for that custom CNAME are required
  • VPS and Dedicated servers in "exotic" locations. Currently Russia, Brazil, South Africa are top priority.
  • Partnerships. Companies and projects that are interested to use jsDelivr as their official CDN.
  • Promotion. Includes bloggers and authors to do benchmarks and reviews of our services.
  • Coders/Designers to help with the website
  • Active people to get involved in various ways in the project
  • Ideas! New features, ideas for promotion...

If you can help with something else that is not listed then feel free to contact me.
All help is appreciated.

error in minified version of "sorttable"

//cdn.jsdelivr.net/sorttable/2/sorttable.min.js is returning this atm :

[ERROR] in /home/mintymike/public_html/refresh-sf.com/public/yui/files/9d5c694fb712b2af7140d5607462e4f5f234d63c.txt
  19:31:missing ; before statement
[ERROR] in /home/mintymike/public_html/refresh-sf.com/public/yui/files/9d5c694fb712b2af7140d5607462e4f5f234d63c.txt
  1:0:Compilation produced 1 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors.
    at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:172)
    at org.mozilla.javascript.Parser.parse(Parser.java:396)
    at org.mozilla.javascript.Parser.parse(Parser.java:340)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:315)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:536)
    at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:147)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)

Improve search

Reported bug:
try searching for "jquery ui" or "jquery-ui"
you wont find it, you will have to specify the word correctly as "jquery.ui"
this doesn't work if people don't know the exact name.

Allow Loading of Helpers in file-combiner

I would like to load fancybox and it's media helper in one file, but the current system does not seem to allow this.

Desired:

//cdn.jsdelivr.net/g/[email protected]

Current:

//cdn.jsdelivr.net/fancybox/2.1.5/jquery.fancybox.pack.js
//cdn.jsdelivr.net/fancybox/2.1.5/helpers/jquery.fancybox-media.js

update maskmoney

Hey guys, can you update the maskmoney to version 2.1.1?

Besides that, there's any automated way to update plugin versions on jsdeliver?

load mainfiles knockout

Hi,

This loads http://cdn.jsdelivr.net/g/knockout the version 3.0.0 beta, in stead of the official release version 3.0.0.

Shouldn't that url load the latest of knockout project?

Reporting for each project

Try to get a reliable number of hits per project.

  • Number of hits per project. Combine the hits of all files under cdn.jsdelivr.net/$projectName/*
  • I think 30 days of data is enough
  • Add a hits parameter to jsDelivr API.
  • Show hits on the website?

I don't think bandwidth is that important, authors want the hits to see the popularity of their projects.

Public Charts

  • Performance charts per provider
  • DNS decisions charts

Report performance issues here

If you believe jsDelivr is slow please report your findings and data over here.
I will do my best to fix the problem.

Please include your IP address and any other information you have.

API prints dozens of errors

The API appears broken.

Notice: Undefined index: github in /home/www/jimaek/jsdelivr.com/www/packages.php on line 28 is printed out many times

Warning: parse_ini_file(../www/files/wp-jupiter/info.ini): failed to open stream: No such file or directory in /home/www/jimaek/jsdelivr.com/www/packages.php on line 25 is printed once, along with Warning: Cannot modify header information - headers already sent by (output started at /home/www/jimaek/jsdelivr.com/www/packages.php:28) in /home/www/jimaek/jsdelivr.com/www/packages.php on line 53

Then follows what I assume is the actual API.

Automatic update from github releases

This could be a convenient feature to enable automatic update the projects with the new version from github releases like the way bower does it.

So for example I have this project https://github.com/danialfarid/angular-file-upload and to maintain it in bower registry I have https://github.com/danialfarid/angular-file-upload-bower which is basically the same thing but only with the necessary files for production. Whenever I do a release on angular-file-upload-bower project the bower will automatically pull it from the github releases if someone trying to install and use that specific version.

If you could do the same thing here and just add all those file to the root it makes it much easier for me without having to create a pull request each time. I have kind of stopped updating the CDN since it's a hassle to create a pull request each time I release a new version.

Repositioning the items when Items are hidden

Thank you for the wonderful plugin :)

Hi,

I would like to have the function to reposition the items in the pinterest-like view in jquery.freewall. Basically I am implementing the filters to filter some of the div according to its content (like free text search). When I do that, I can able to hide (display:none) the items but the items are not repositioned to the top.

I know this is because freewall using position:absolute to position the items. If I use position:relative and comment the line number 272 and 273 //top: -- and //left: -- values. the blocks repositioning correctly but the blocks are not stacked one by one (there are some gaps between rows).

Is there any other way to achieve this using your plugin?

your help will be appreciated!!!

Proofread README

I need a native English speaker to check out our README and fix any mistakes he finds and improve the readability of the text.

Can someone help with this?

A real API for jsDelivr

A real fully featured API is needed.

http://api.jsdelivr.com/packages/json
Outputs all hosted projects and files of latest versions

http://api.jsdelivr.com/packages/json?versions=all
Outputs all hosted projects and files for all hosted versions

http://api.jsdelivr.com/packages/xml
Same XML formatted output

http://api.jsdelivr.com/packages/xml?hash=true
Includes md5 hashes for each file

http://api.jsdelivr.com/project/jquery
By default outputs JSON with jQuery information and files of latest version

http://api.jsdelivr.com/project/jquery?version=1.9.1&hash=true&url=true
Request info for specific version and include hashes. Also instead of relative paths outputs full URLs for each file.

http://api.jsdelivr.com/versions/jquery
A list of all hosted versions of a project

http://api.jsdelivr.com/lastver/jquery
Output the latest version of a hosted project

http://api.jsdelivr.com/files/jquery
Output the list of hosted files for a project. By default latest version

http://www.jsdelivr.com/mainfile/jquery
Get the main file of a project. Relative by default. &url=true for full URLs

fontawsome and IE

In IE (10) debugger : I get this errors in the console, which hides all the icon-fonts, when I include //cdn.jsdelivr.net/fontawesome/3.2.0/css/font-awesome.min.css :

CSS3117: @font-face failed cross-origin request. Resource access is restricted. 
fontawesome-webfont.eot
CSS3117: @font-face failed cross-origin request. Resource access is restricted. 
fontawesome-webfont.woff
CSS3117: @font-face failed cross-origin request. Resource access is restricted. 
fontawesome-webfont.ttf

This error doesn't appear if I include : //cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.min.css

Load multiple files with single HTTP request

Dependency: #180

Idea:
Combine multiple projects into a single JS file based on user request.
Example
//cdn.jsdelivr.net/s/jquery,jquery.cookie,alertify.js,accounting.js
//cdn.jsdelivr.net/s/jquery:2.0.1,jquery.cookie,alertify.js:0.3.8,accounting.js

All names and versions should be based on jsDelivr existing projects.

jsDelivr - a new take on the project's brand

As the project progresses ahead, future scenarios for more unified and apparent project's brand presence becomes stronger.

I'm voluntarily proposing a new brand image for jsDelivr. Would like to hear out thoughts on the take.

jsdelivr-logoartwork2
jsdelivr-logoartwork1
jsdelivr-logomark-explanation-sheet

searching for file gives 'no result'

Hi,

When I search for jquery-ui or jquery.ui (notice the dash and dot) or jquery.validate or jquery-validate (tried lots of combo's, hope you got the idea), it says 'no result'.

But how come I can just go to: http://cdn.jsdelivr.net/jquery.ui/1.10.4/jquery-ui.min.js,
and see the content of it?

I'm sure that I did find the files in the past using the search field.
I was trying to load jquery 2.0.3, jquery-ui.min.js, jquery-validate.min.js in one http request.

How can I do this?

Thanks in advance!

By the way, I saw knockout 3.0.0beta (in the dropdown button), and I think it should be 3.1.0beta. Because 3.0.0 is officially out for a while now.

EDIT: it seems that moment, knockout, knockout.mappings, mustache and a few more can't be found either.

How to add the Modules of a library?

I wanted to add Zepto Modules but i was wondering, should it go separately (Ex: zepto.ie, zepto.data, etc.) or it can be added to the Zepto project itself?

I think it would be good if it's within the Zepto project as they don't have any version for each module and are mostly depended on the main file and should be used with the main anyway.

What you think about this? I'm gonna send the PR today after you confirm.

Main file for every project

TODO:
Add a mainfile parameter to every project.
This will allow people to create new tools for jsDelivr.
Plus gives me the ability to add a lot of awesome features.

Add option to select a file in grouping

Hello,

I was trying the grouping feature today to save multiple calls (Very good stuff btw 👍)

And found there are 2 issues with this:

  1. Your system simply concatenates the main files without any knowledge of the type of file it is (CSS/JS). So if you load this link for example normalize,jquery you can see, it loaded CSS and JS both in one which won't obviously work (How is the browser supposed to understand and execute?). I do understand that's not how we're supposed to use the grouping feature and as per the README, it is only for JS but even though it is for JS, how can i access other JS files within a project while grouping (other than main file)? And it would be good if it can support CSS as well.
  2. Some libraries have CSS files with JS file as their mainfile and vice-versa. So if you want to group a lib's CSS file with other CSS files, it isn't working the way it is supposed to work (assuming it should have supported CSS as some projects mainfile is CSS) and instead it loads the mainfile (In this case it loads JS file) which i have already explained above. Here's the link which I'm trying to load in which i just want to group second project's CSS file along with the first one, but it simply loads the main JS file, hence it fails.

So it would be good to have some sort of option to select single file of a project to group with other files and support for CSS too.

Thanks!

jQuery.Payment Fails To Init?

For some reason, I cannot get the jquery.payment library to initialize. The source seems to load fine, but I cannot perform the provided functions of the library like I can if I load the script locally. Locally loading the script works just fine.

I also tried this with the version of jquery.payment hosted on cdnjs.com CDN. It has the same problem.

Example (view console error when run/loaded):
http://jsfiddle.net/DDw6A/

Any idea what is causing this?

Update QUnit

Is it possible to add QUnit 1.13.0 and 1.14.0?

Regarding workflow and durability of old versions

I was using a library hosted on some other public CDN. The maintainer of the library accidentally updated an older version with new code and broke the library thus breaking our application. I didn't realize how devastating this was and am making efforts to avoid this.

Does jsdelivr have any mechanisms to avoid this? I am also looking at using a cdn and setting up jsdelivr as a pull zone origin so as to preserve the integrity of the library versions.

Names omitted for respect of respective parties.

Linking directly to a specific item

I created a semipopular CSS library named Min. On its downloads page, Min links to its jsdelivr listing, but the link doesn't go directly to its jsdelivr listing. Instead, it lists all frameworks whose names include the word "min". This puts Min at the bottom of the page.

The URL in question: http://www.jsdelivr.com/#!min

Is it possible to link directly to Min's entry?

Automatically get new versions from Github tags

Create an automated system that will be able to keep selected/most projects updated.

Idea:
Create jsdelivr.json and fallback bower.json. Download tag, remove useless files based on rules and sync with CDN.

Team up with rawgithub

These smart people wanted to use raw.github.com/user/repo/master/filename.js as a host but couldn't because raw.github serves everything with a text MIME. So they bought rawgithub.com setup a proxy/mirror and filtered X-Content-Type-Options: nosniff from the header.

Sadly, if you use it in a production site, they blacklist you and eventually start serving evil.css:

/* Don't send production traffic to rawgithub.com! */

html {
    -moz-transform: rotateX(180deg) !important;
    -webkit-transform: rotateX(180deg) !important;
    transform: rotateX(180deg) !important;
}

You could try and get MaxCDN and others to step up and start really competing with cdnjs!

Min not visible on home page

For some reason, whenever I search for min on jsdelivr it doesn't show up. I don't know why, because it's definitely there.

Bootswatch themes missing font folders

None of the Bootswatch themes have '../fonts/glyphicons-halflings-regular.[type]' as called for in the css, hence none of the glyphicons work. Also, is it also too much to ask for bootbox.js to be included? (From bootboxjs.com) It is being offered at MaxCDN I noticed. Thank you!

Should I continue to send PRs ?

Hi there,

I remember you mentioned a new feature that would automagically synch the CDN every time I push a new version of my plugin to github. Is this feature already in place? In other words, should I continue to send you Pull Requests for my javascript files?

Thanks

jsdelivr.com/network.php Broke

{"message":"Account over limit."}

I was snooping to see how switching to CloudFlare changed things.

BTW, I wonder if there should be a jsdelivr.com repo?

Chrome (32) does not cache all-in-one files.

This seems to be an issue with chrome, which is setting the Cache-Control to max-age=0 and ignoring the response. I'm not entirely sure how you would go about fixing this, maybe by appending script.js to the end of the URLs so it expects JavaScript (it seems unsure about what to expect).

Request

Request URL: http://cdn.jsdelivr.net/g/modernizr,selectivizr,jquery,jquery.equalize
Request Method: GET
Status Code: 200 OK

Request Headers

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en;q=0.8,en-US;q=0.6
Cache-Control: max-age=0
Connection: keep-alive
Host: cdn.jsdelivr.net
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36

Response Headers

Access-Control-Allow-Origin: *
Cache-Control: public, max-age=315360
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/javascript
Date: Sun, 16 Feb 2014 13:23:29 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Age: 2199
X-Cache: HIT
X-Cache: HIT
X-Edge-IP: 185.2.138.117
X-Edge-Location: London, GB

Latest minor versions

(moving discussion from #235)

It would be nice to have version-dependent latest. There are two ways this can be done (examples from that wiki page):

//cdn.jsdelivr.net/abaaso/latest/3.8/abaaso.js

Loads version 3.8.16 if it is the latest version in 3.8 branch. /latest/3/abaaso.js will return the latest version in 3 branch: e.g. 3.11.5.

//cdn.jsdelivr.net/abaaso/3.8/abaaso.js

This will load version 3.8 if there is a directory for it, or the latest version in 3.8 branch (3.8.16) it there isn't. There might be a problem if author doesn't keep version format consistent.

@jimaek: I want to make the URLs more dynamic but my problem is reliability. With static files I know 100% the user will get the contents of the file. But for example if I create a PHP script to handle different parameters like the versions you said then a lot of new points of failure are added. script code, php-fpm, MySQL, server load...

Well, latest versions are surely not generated by a PHP script, but probably just copied to some location. The same algorithm can be applied to sub-latest versions (1, 1.0, 1.1, 2, 2.0 etc). Hardlinks can remove any disk space overhead.

As for one-week update delay, this is a problem. And I don't know how it can be solved — except for keeping a separate "routing" server, which receives a request for a sub-latest version, and routes to the correct file. But it will be a SPF, which is bad. Still, it is a task worth thinking about. It will also allow for faster latest.

Multiple project pulls?

If an individual had several projects to update or add, would you prefer a single pull request for changes done at once? Or break apart into 1 pull = 1 project?

I can go either way, though I think my laptop HD would be happier with a single pull request for many packages ;)

JavaScript files' MIME type

Is there any reason as to why JS files are getting served with the application/x-javascript Content-Type? RFC 4329 discourages the use of these "experimental" media types and suggests application/javascript instead.

Easier way to add projects

I hate the idea of hosting all files in Github but I don't see any other alternative.

Does anyone have any ideas on how improve this system? Ideally we want to host in Github only configs/meta data required for everything to function and not the actual files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.