At the time of sharing this video, we, at JaD are auditing our website to improve the speed and quality of our web services and content to our valued users. Brotli was one of the tools that were recommended to us by Google Lighthouse auditing tool. Individualistically, We've used Brotli in the past on various projects. Now, thanks to the experiences of our team members, we were able to install Brotli quite easily, of course with the help of this video. Setting up Brotli on Ngnix, Apache2 and other major servers are quite effortlessly easy and terse. It took us less than 5 minutes to install and setup.
Brotli in action
After setting up Brotli, we saw a 12% increase in performance. Pages were loading faster and more reliable.
- Javascript files compressed with Brotli are at least 23% smaller than gzip
- CSS files are 13% smaller than gzip. We haven't minified our CSS and JavaScript files as yet. CSS/JS minification is our next agenda.
Installation Steps
sudo apt-add-repository -y ppa:hda-me/nginx-stable
sudo apt-get update -y
sudo apt-get install brotli nginx nginx-module-brotli
Test if Nginx is configured properly by using
nginx
-V 2>&1 | tr ' ''\n'
| grep brotli
Restarting Nginx
sudo service nginx
restart
Configuration
brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/vnd.microsoft.icon image/bmp image/svg+xml;
Comments
I Have followed your tutorials, but was unable to set up a the server on Linode cloud server with Ubuntu 18.4 nginx and brotli with ssl cert..
Please can you help me setup the nginx server with the latest stable version on Ubuntu 18 along with Brotli, SSSL vcert and drupal 8
Thanks in advance.