free cdn

Content delivery networks are beneficial for a number of reasons. Primarily, they help accelerate your static content globally so that no matter where your users are, they experience fast loading speeds. However, CDNs also offer a number of other benefits including:

  • Improved SEO due to faster page speeds
  • Increased reliability as if 1 CDN server goes down, most CDNs have fallback mechanisms in place to re-routed traffic to the next nearest possible server
  • Stronger security & DDoS protection
  • Decreased load on your origin server therefore potentially lowering your hosting costs

Apart from the premium CDN services reviewed here on cdn.reviews, there also exist various free CDNs. These types of CDNs typically allow you to link to popular web-based libraries (CSS / JS frameworks for example) which will then be delivered to your web visitors from the free CDN’s servers. Free CDN services however typically do not allow you to upload your own content to their servers. You also have far fewer available features compared to using a premium CDN such as access to a dashboard, origin shield, an API, and the list goes on.

Typically, free CDN services only allow you to link to a particular asset they host. These assets are most commonly included in your website’s HTML code and defined by a <script> or <link> tag.

The following section outlines a few popular free CDN services.

cdnjs

cdnjs banner

cdnjs offers an array of popular JavaScript and CSS libraries that you can choose from to link within your web project. This service is sponsored by CDN providers Cloudflare and KeyCDN and is currently is used by over 1 million websites worldwide. This free CDN service offers:

  • Over 2900+ libraries with 65,000+ versions
  • HTTP/2 and HTTP/HTTPS support
  • An impressive network using the PoP locations of both Cloudflare and KeyCDN

With cdnjs you also have the option to simply copy the asset URL, asset URL with script tag, or asset URL with script tag and SRI. An example of what this looks like resembles the following.

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/6to5/3.6.5/browser-polyfill.js" integrity="sha256-zYhLqWlbmuHWIRqAMv5b7HWaa20/zmYPKqDJIypzY9w=" crossorigin="anonymous"></script>

jsDelivr

jsdeliver banner

jsDelivr is another popular free CDN choice that’s similar to cdnjs. It uses the networks of premium CDN providers (KeyCDN, MaxCDN, and Cloudflare) to deliver open source project assets. With this service, you can search from over 2,100 projects and use the custom jsDelivr URL to call these assets within your project’s HTML code. jsDelivr also provides:

  • Over 110 PoP locations around the world
  • A strong presence in Asia and China
  • Multi-CDN load balancing

All snippets start off with https://cdn.jsdelivr.net/ and are then followed by the name of the project, version number, etc. You can also tell jsDelivr to generate the URL with the script tags as well as enable SRI if you wish. For example, with both options checked, jsDelivr will generate the following for the open source project – Springy:

<script src="https://cdn.jsdelivr.net/springy/2.0.1/springy.js" integrity="sha256-J5xxOHkWUqf/DDsh+a3Vp9WRGBGoqXFX6M7hLFU/v70=" crossorigin="anonymous"></script>

Google Hosted Libraries

google banner

Google’s Hosted Libraries allows you to link to popular Javascript projects that are hosted on Google’s CDN network. Although they don’t offer as many projects as jsDelivr or cdnjs, Google’s Hosted Libraries host the most popular Javascript projects.

They also serve the CDN files with CORS & Timing-Allow headers and you are allowed to cache them for 1 year. All Google’s Hosted libraries files start with the following URL https://ajax.googleapis.com/ and are followed by the project’s name, version number, etc. An example of how this looks with the script tag is as follows:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>

Microsoft Ajax CDN

microsoft banner

The Microsoft Ajax Content Delivery Network is similar to Google’s Hosted Libraries in that they host only popular JS and CSS libraries however also host various versions of these libraries. A few popular hosted libraries include jQuery, Bootstrap, Modernizr, etc. All Microsoft Ajax files begin with the URL http://ajax.aspnetcdn.com/ajax/ and are followed by the library’s name, version number, etc. An example of a full Microsoft Ajax CDN file URL will look similar to the following.

http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.js

Final Thoughts

These 4 free CDN services are great choices for accelerating the loading speeds of third-party libraries on your site. Although you won’t be able to accelerate your own content with these CDN services (e.g. site-specific images, JS, CSS, etc) it’s certainly a great help for site maintainers who are just starting a project or simply don’t have the funds for a premium service yet.

Both cdnjs and jsDelivr are quite popular in the free CDN space. They offer much more selection and have an active and involved community of contributors. Each free CDN service has its pros and cons and although the Google and Microsoft free CDNs don’t offer the same amount libraries, they do provide users with a sense of reliability as they are both reputable and well-known brands.