- KeyCDN offers a free 30-day trial period
- KeyCDN delivers your web assets quickly and safely
- KeyCDN has added Brotli support, allowing an even faster download of assets with less bandwidth usage
- The Brotli support from KeyCDN is free, it is added for free!
- KeyCDN allows you to configure zones so that different parts of your website can have different delivery settings
- KeyCDN offers a Brotli test tool to ensure that your server supports Brotli
What is Brotli?
Brotli, a newer compression algorithm created by Google, provides better file compression and therefore less bandwidth usage and faster download speeds. Brotli creates better compression than gzip. Brotli enjoys support in all major browsers, including Safari recently, and a variety of support from popular server software such as Apache, Nginx, IIS and Node.js (via shrink-ray). The content encoding for the Brotli stream is
br and, like many new web functions, Brotli is only available via HTTPS.
Making Brotli sources with Gulp or webpack
Popular task runners such as web pack and fly have open source libraries to generate static Brotli items. Let us use
gulp-brotli to generate Brotli-compressed items for a website:
var gulp = require (& # 39; gulp & # 39;); var gulpBrotli = require (& # 39; gulp-brotli & # 39;); return gulp.src (& # 39; ./ src / ** / *. & # 39; & # 39;) .pipe (gulpBrotli.compress ()) .pipe (gulp.dest (& # 39; ./ dist & # 39;));
brotli-webpackplugin is your ticket:
var BrotliPlugin = require (& # 39; brotli-webpack-plugin & # 39;); module.exports =
Making your Brotli-compressed static assets is just a small adjustment to your existing building code!
Enable Brotli on KeyCDN
KeyCDN supports the great Brotli compression format, but it is not enabled by default, so you need to take a few moments to turn it on. Click on an existing or new zone from the KeyCDN dashboard and set the "Cache Brotli" setting to "enabled:
That's all you have to do within the KeyCDN panel. A requirement on your side is that your origin server must support Brotli – this allows you to set the quality setting of your Brotli assets. The mod_brotli documentation from Apache offers many short example guidelines to enable Brotli support:
Server configuration of Brotli is quite simple on all server platforms. KeyCDN also offers a Brotli test program to ensure that Brotli is correctly configured on your server.
To ensure that your Brotli-encoded assets are displayed correctly, open each asset request in your browser's development tools and inspect its header; you should see the
content-coding set to
The short time needed to configure the Brotli module of your server and then enable Brotli in KeyCDN has an immediate impact on your users, both on mobile and on desktop.
KeyCDN would like to prove how great they are: they give away two 1TB accounts to David Walsh Blog readers to give them a chance! Do you want to join? Tell me about your favorite CDN feature in the comments section below. Whether it is Brotli, geolocalized servers or any other function, give it a shout and you will participate to win!
Developers go to CDNs to make their websites faster, so it's great to see that KeyCDN offers new, advanced compression techniques with minimal developer settings and at no cost. You know how much a service is important when they insist on improving your website with edge features with little configuration and cost, and Brotli is just one of the key features of KeyCDN. If you are looking for a CDN, take a look at KeyCDN!