Open Source GitHub Pages CDN
An extensive archive of popular and less popular open source projects.
This is a community driven resource. So unlike the "big" CDNs we can can add those little projects you love... and when we add a project we take the time to properly archive it as far back as possible; jquery v1.0.0 anyone?
Small & Fast
GitHub Pages assets are gzip'ed... which can compress the response by as high as 70%!
Use GitHub for file browsing the CDN
If you go to http://viewsource.github.com/jquery it will redirect you to GitHub to see what versions we've got archived for jQuery in the CDN.
If you navigate down to a specific file e.g. jQuery 1.6.2 at https://github.com/viewsource/viewsource.github.com/blob/gh-pages/jquery/1.6.2/jquery.js then simply remove
/blob/gh-pages from the URL and click Enter/Return then BAM you've got http://viewsource.github.com/jquery/1.6.2/jquery.js
Alternatively you will see at the end of the
viewsource.github.com / jquery / 1.6.2 / jquery.js breadcumb path there is a little "copy to clipboard" icon. This will copy
jquery/1.6.2/jquery.js to your clipboard... simply paste that onto the end of
http://viewsource.github.com/ and you've got your url.
Consistent and predictable versioning
We "normalize" the version numbers and remove them from the filenames e.g.
jquery-1.6.js is archived under
/jquery/1.6.0/jquery.js - notice the extra
.0 in our folder, this makes switching between versions simple:
Dynamic "lastest" versions
A dynamic "latest" version is supported for when you want to test against whatever the most recently released version is in the archive.
Host your own!
Simply fork this project to host your own GitHub Pages CDN. You will need to fork and then do a commit and push to GitHub before they will setup your GitHub Pages hosting.
Here's my personal fork... http://chrisjacob.github.com/viewsource.github.com/jquery/latest/jquery.js
Tip: the repository only has a
gh-pages branch; there is no additional
master branch. So you only need to do
git push when pushing to GitHub... which is much easier to type then
git push origin gh-pages.