Free CDNs - Utilizing Open Source In Your Projects
The team here at KeyCDN loves open source. We use a lot of open source software in our own projects and we also believe it is important to give back to the community to help make the web a better, faster, and more secure place. While there are a number of fantastic premium CDN solutions you can choose from there are also a lot of great free CDNs (open source) you can utilize to help decrease the costs on your next project. Most likely you are already using some of them without even knowing it. Check out some of the free CDNs below.
Open source software is software that can be freely used, changed, and shared by anyone.
- Open Source Initiative
Google CDN - Hosted libraries
Google hosted libraries is part of the Google developers platform and is available to everyone free of charge. They host some of the world's most popular JavaScript libraries such as AngularJS, Dojo, Prototype, and jQuery. According to W3Techs, 17% of all websites are using one or more of Google's hosted libraries, including large traffic sites like imgur.com, stackoverflow.com, and go.com. Besides their JavaScript libraries they also host Google Fonts and a web font loader which we have discussed in our post on web font performance.
Their CDN's files are served with CORS and Timing-Allow
headers and allowed to be cached for one year. Because of their large infrastructure they provide high availability and low latency delivery. You can see the results below we ran on their jQuery library with our single asset Performance Test tool, which allows us to test from 10 different locations:
https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
The Google CDN does allows for assets to be served via HTTPS and they do support HTTP/2.
Microsoft Ajax CDN
The free Microsoft Ajax Content Delivery Network also hosts popular JavaScript libraries such as jQuery, jQuery UI, ASP.net Ajax, SignalR, and MVC which you can use to speed up your website or web application. According to W3Techs, 1.4% of all websites that are using a JavaScript content delivery network are using the Microsoft Ajax CDN, including large traffic sites like vulture.com, nero.com, and visualstudio.com. They also have a very large infrastructure built upon their Azure CDN service which provides high availability and low latency.
We then ran a test again on their jQuery library:
https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js
The Microsoft Ajax CDN does allows for assets to be served via HTTPS however they don't yet support HTTP/2.
jsDelivr
jsDelivr is another free CDN (open source) which provides a great way for developers and webmasters to deliver their assets. They host JavaScript libraries, jQuery plugins, CSS frameworks, fonts and more. They allow library grouping to download libraries through a single HTTP request.
We then ran a test again on their jQuery library:
https://cdn.jsdelivr.net/jquery/3.0.0-beta1/jquery.min.js
The jsDelivr CDN does allows for assets to be served via HTTPS and some providers do support HTTP/2.
cdnjs
cdnjs is another free CDN (open source) that host a lot of different libraries, not just the most popular ones, including JavaScript, CSS, SWF, images, etc. It is currently sponsored by KeyCDN, Cloudflare, UserApp, and Algolia. According to W3Techs, 6.2% of all websites that are using a JavaScript content delivery network are using cdnjs, including large traffic sites like taboola.com, nbcnews.com, and lockerdome.com. And according to BuiltWith, it is being used by ~1,143,000 websites worldwide.
We then ran a test again on their jQuery library:
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.js
cdnjs does allows for assets to be served via HTTPS and they do support HTTP/2.
jQuery CDN
jQuery also has their own free CDN in which you can use. They host uncompressed and minified versions of jQuery, jQuery migrate, and jQuery UI. According to W3Techs, 13.7% of all websites that are using a JavaScript content delivery network are using jQuery, including large traffic sites like businessinsider.com, harvard.edu, and inquirer.net.
We then ran a test again on their jQuery library:
https://code.jquery.com/jquery-2.2.3.js
The jQuery CDN does allows for assets to be served via HTTPS however they don't yet support HTTP/2.
Premium CDN solution vs free CDNs
While free CDNs can help decrease the costs and sometimes improve performance it is also important to test these integration's yourself as it might not be the most optimal setup. Here are a couple of benefits of using a premium CDN solution such as KeyCDN vs a free CDN:
- If you combine assets to serve from KeyCDN you can reduce DNS lookups.
- Benefit from HTTP/2 vs HTTP/1.1 across all of your delivered assets.
- If you are running over HTTP/2 you can take better advantage of parallelism if you have one single HTTP/2 connection.
- HTTP/2 HPACK compression along with Huffman encoding can help further decrease the size of your HTTP headers.
- Easier to purge cache under one single interface.
- Have more control over caching of your assets with cache control.
- Ability to host your custom JavaScript libraries and scripts.
Open source projects
Do you currently run an open source project and need a CDN? We are committed to contributing to open source projects with free CDN accounts. Please contact us for more information.
Summary
As you can see there are a lot of great free CDNs (open source) that you can utilize in your website or web application. And some of them you are probably already using. But just because it is free doesn't always mean you should be using it. Make sure to test your assets when you introduce different third party networks to ensure you are getting the best delivery of your content. Always do your due diligence when doing a CDN comparison.