• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


enable brotli compression nginx brotli vs gzip

 

 

#1 Install Brotil Module precompiled ubuntu & debian

sudo apt-get install brotli nginx nginx-module-brotli

#1.1 Add Repository if not yet added by default

sudo apt-add-repository -y ppa:hda-me/nginx-stable
sudo apt-get update

check nginx version stable or mainline and current version.

and repeat 1st step,

#1.3 installing brotle from source github compiling on server

check how to add dynamic module in nginx.

pagespeed module nginx

 

#2 Load module in nginx .conf top

nano /etc/nginx/nginx.conf

load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so;

#3 Replace  Gzip conf with Brotil bottom of nginx.conf

#brotli
 brotli              on;
 brotli_comp_level   5;
 brotli_static       on;
 brotli_types        text/xml image/svg+xml application/x-font-ttf image/vnd.microsoft.icon application/x-font-opentype application/json font/eot application/vnd.ms-fontobject application/javascript font/otf application/xml application/xhtml+xml text/javascript  application/x-javascript text/plain application/x-font-truetype application/xml+rss image/x-icon font/opentype text/css image/x-win-bitmap;

compression level 0-11.

you may use html separate compression level

 

#3.1 Use along with Gzip

You can place brotli compression. below the GZIP. browsers automatically choose between them based on supported compression.

 

 

#4 Restart nginx and verify the compression Accept-encoding

 

 

systemctl restart nginx

 

HTTP/2.0 200 OK
server: nginx
content-type: text/html; charset=UTF-8
vary: Accept-Encoding, 
content-encoding: br

Content length with gzip

content length with brotil

  • Compile & install Nginx from source with brotli support
    & Remove existing
    Starts or restarts Nginx

#1 Installing Brotil in Apache ubuntu debian

 

sudo apt install brotli && sudo a2enmod brotli

 

#2 Configuring brotil in apache

 

you can edit conf directory in conf directory or module directory.

 

Adding to host for specific directory website.

    
<IfModule mod_brotli.c>
    AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
    </IfModule>

3. systemctl restart apache2

 

verifying  terminal  or online curl tool or chrome de tools

curl -I -H 'Accept-Encoding: br' https://raazkumar.com


curl -I https://raazkumar.com
curl -I -H 'Accept-Encoding: gzip' https://raazkumar.com

 

 

content-encoding: br

GZIP (Deflate) vs Bortil

 

GZIP: LZ77 +Huffman coding = Deflate algorithm.

General Rule: brotil compress better than gzip.

 

Why we use brotil instead of gzip?

faster than gzip, efficient than gzip.

it uses a dictionary of common keywords and phrases on both client and server side and thus gives a better compression ratio.

Js 14%, html 21%, Css 17% smaller than gzip as per recent study.

Images: may already compressed.

Compression level 1-11 (11 means high compression) 1MB file 1KB means 90% compression.

pagespeed improment maybe upto 30%-50% for static files.

gzip compression level by default 5 you may increase upto 11 for static files.

the downside is compression time. do test and deploy.

improve Page load speed 3 seconds to 2 seconds (30% smaller page size than gzip)

 

 

 

Troubleshooting

The following packages have unmet dependencies:
nginx-module-brotli : Depends: nginx (= 1.17.3-2-ppa7~bionic)   (compiled with 1.17 )
E: Unable to correct problems, you have held broken packages.

root@instance-1:~# nginx -V

nginx version: nginx/1.19.1

built by gcc 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) (Bionic )

we need to compile with installed nginx. or remove old nginx, install with brotil.  dynamic module.

Brotil by google at github

Related topics:

  1. nginx modules list (enable, disable, upgrade, install dynamic module)
  2. enable browser caching in wordpress apache nginx caching headers explained
  3. nginx installation on ubuntu 20.04 LTS
  4. htaccess tutorial tips for wordpress #redirect #leverage browser cache #Gzip #KeepAlive
  5. Pagespeed module install, configure, monitor, errors ft nginx &apache

tutorials

  • Vivek Bindra Videos Transcription (business strategy)
  • git commands
  • new relic php agent install in 3 steps
  • new relic mysql install integration - 2 ways fix problems
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • Devops course Syllabus topics PDF AWS, Azure, cisco, redhat
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
    • Top 10 tips to improve nginx server security
    • upgrade php fpm ubuntu nginx 7.4 to 8.2
    • install phpmyadmin ubuntu nginx 22.04
    • php fpm install ubuntu 20.04 nginx
    • nginx upstream response is buffered to a temporary file
    • php fpm ondemand vs dynamic vs Static (the dynamic pool problem)
    • Php fpm configuration for 1000 concurrent connections server busy max children reached
    • php fpm seems busy fixed warning and max children reached to handle max connections / requests
    • newrelic nginx integration process and errors fix and metrics
    • datadog nginx integration installation process
    • nginx rate limiting explained by location time specific url
    • SSL faster reduce TLS hand shake improve https performance
    • monitor nginx request with nginx status amplify datadog new relic
    • nginx installation on ubuntu 20.04 LTS
    • enable brotli compression nginx brotli vs gzip
    • nginx performance tuning
    • Letsencrypt SSL Installation on apache/Nginx ubuntu / debian wordpress
    • letsencrypt install configure on ubuntu / debian nginx
    • what is TTFB & how to Reduce it (server response time) Google pagespeed
    • php fpm restart nginx ubuntu enable status page, monitor etc
    • php fpm pool manager configuration settings based on server spike high cpu wordpress
    • nginx modules list (enable, disable, upgrade, install dynamic module)
    • nginx rewrite rules with examples 301 redirection
    • use nginx as reverse proxy and load balancer for apache wordpress
    • nginx conf explained best config file performance tuning tips nginx.conf location errors tutorial
    • nginx errors (504,502, 413, unable to start, syntax errors)
    • Pagespeed module install, configure, monitor, errors ft nginx &apache
    • Apache vs nginx (connection handling, modules, memory usage)
    • install LEMP Stack on 22.04 LTS Nginx MySQL PHP fpm #wordpress #digital ocean
    • nginx fastcgi cache wordpress how to configure
    • fix error 520 522 524 on cloudflare wordpress godaddy nginx etc
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2023 - All Rights Reserved Disclaimer & Privacy Policy