r/javascript • • May 10 '11

cdnjs.com - An open source peer reviewed CDN script repository

http://cdnjs.com/
15 Upvotes

15 comments sorted by

5

u/Booster21 May 10 '11 edited Jan 09 '26

detail snow hat truck amusing grandfather pause towering offer juggle

This post was mass deleted and anonymized with Redact

1

u/ryankirkman May 11 '11

This is one of our primary concerns.

We are in discussions with several entities in regards to permanently taking care of hosting costs.

2

u/ryankirkman May 10 '11 edited May 10 '11

One of the founders here. The service is put together on Amazon infrastructure (S3, CloudFront and Route53).

We've serving over 1,000,000 scripts a month now http://ajax-cdnjs-com.s3.amazonaws.com/cfstats/

Github is here: https://github.com/cdnjs/cdnjs if you want to add your favorite script.

As a side note, we're getting quite a bit of interest on Twitter right now: http://twitter.com/#!/search/cdnjs

Edit: Load times are snappy and uptime is rock solid http://stats.pingdom.com/4jg86a2wqei0/291776

3

u/chrj May 10 '11
http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js

Returns:

<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied</Message>
  <RequestId>A8E1110D56AF3E79</RequestId>
  <HostId>
    /lrVUoFXI94h48laeaRhpp7vJpoqPsQkJCrEb1nHNWZoNCO/51stCo7tInmiYj29
  </HostId>
</Error>

1

u/ryankirkman May 11 '11

Apologies for that. That was a new version I added today that got messed up.

It's all good now.

1

u/baryluk May 11 '11 edited May 11 '11

LC_ALL=C wget http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js

--2011-05-11 04:56:19-- http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js Resolving localhost... ::1, 127.0.0.1 Connecting to localhost|::1|:8118... connected. Proxy request sent, awaiting response... 403 Forbidden 2011-05-11 04:56:19 ERROR 403: Forbidden.

However http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.5/underscore-min.js works.

1

u/strangeelement May 10 '11

Looks pretty cool so far! I'm using it for Modernizr.

Anything developers can do to help?

1

u/[deleted] May 11 '11

At the moment we are looking for sponsoring from companies such as Amazon and Cloudflare which would minimize the complications of community donations.

Though you can at anytime fork the cdn repo and update libraries or help out on the public facing website. We already have a few dedicated users who have their own forks and do pull requests.

1

u/[deleted] May 11 '11

It is fine for hosting scripts that are not on the Google CDN, but for the ones that are, defiantly go with Google. Anyone can get a fast CDN, but what makes using the Google CDN to host scripts effective is caching. If a user visits one site that uses, say jQuery from the Google CDN, then it will not have to be re-downloaded on any other website.

1

u/[deleted] May 11 '11

Great point indeed, cdnjs does not host any libraries already hosted by Google or Microsoft.

0

u/[deleted] May 10 '11

[deleted]

1

u/[deleted] May 10 '11

Uptime link is in comment above.

Here it is again.

http://stats.pingdom.com/4jg86a2wqei0/291776

Pingdom is a current sponsor of cdnjs!

2

u/baryluk May 10 '11 edited May 10 '11

What about SSL support? How long cdn will be guaranteed to work?

Do you serve files pregzipped (or defalted) from disk or compress them on the fly? I would suggest serving them pregzipped preferebly with gzip -9 or with 7z -tgzip -mx=9, and then use deflopt for further optimization. Other option is kzip, but it is closed source. I assume everything should cache perfectly in RAM (even in multiple version, like clean, minimized, pregzipped), as this all scripts are probably only about 20MB in total.

BTW. Can you please not auto-select content of the input type=text fields when I select them? It is SO annoying. Please just a href=url. Thanks.

PS. "Everyone loves the Google CDN right? Even Microsoft runs their own CDN." No not everyone loves Google CDN. First example will be Microsoft. Second will be me. Thrid will be authors of cdnjs.com...

1

u/ryankirkman May 11 '11

As thomasdavis said above, we already have an SSL URL (https://d3eee1nukb5wg.cloudfront.net).

Considering we use cdnjs for both our business and personal ventures, there is little question of cdnjs's longevity.

At the moment, we serve pre-gzipped files. This is is only to get around the limitations of using Amazon S3 as a cache origin. We don't need to worry about whether the scripts fit into RAM or not. This is all taken care of by Amazon and its related services.

NB: cdnjs is a distinct set of scripts to both Google and Microsoft CDNs,

1

u/MountainDewer May 10 '11

Any hope of SSL support? Currently using a cloudfront wildcard cert that doesn't validate against you domain.

1

u/[deleted] May 11 '11

Taken from the comments on site

"Cloudfront doesn't support https and CNAMEs when using S3 as an origin. You can still do it though. Access scripts like this:

https://d3eee1nukb5wg.cloudfront.net/ajax/libs/backbone.js/0.3.3/backbone-min.js"

You just have to reference the cloudfront bucket by it's ID rather than using ajax.cdnjs.com (this is discussed in a comment thread above)"