{"id":15508,"date":"2022-02-09T12:53:31","date_gmt":"2022-02-09T12:53:31","guid":{"rendered":"https:\/\/newblog.siteground.com\/en\/?p=15508"},"modified":"2025-06-03T08:24:20","modified_gmt":"2025-06-03T08:24:20","slug":"brotli-vs-gzip-compression","status":"publish","type":"post","link":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/","title":{"rendered":"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Are you looking for free ways to make your website faster? One way that every website owner can get a little free speed is to turn on compression at the server. When both the webserver and the browser it is conversing with understand a common compression algorithm, then the data that is actually sent over the wire can be compressed. Compressed data is smaller. Smaller data is received faster.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-compression\"><span class=\"ez-toc-section\" id=\"what-is-compression\"><\/span><strong>What is Compression?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you type in a URL into your browser, <strong>your browser starts a conversation with the server<\/strong> and one of the things it tells it is if it can decompress content and if so, what compression \u201calgorithms\u201d it understands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Your server listens<\/strong>, and if you have turned on compression and it knows one of the compression algorithms the browser does, it will <strong>compress all the data and send it to the browser<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most modern web browsers understand or \u201caccept\u201d content encoded in one of <strong>three algorithms<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Deflate<br><\/li>\n\n\n\n<li>Gzip<br><\/li>\n\n\n\n<li>Brotli<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When a web browser contacts a server, it sends a <strong>header<\/strong> that looks like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Accept-Encoding: br, gzip<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That tells the server that it understands data compressed in either Brotli (br) or Gzip (gzip). Servers do have the option of ignoring this and returning uncompressed data as well.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Overall though, <strong>compressed data travels faster than uncompressed data<\/strong>. So your website gets to the browser faster if the data is compressed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compression mainly applies to text:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HTML<br><\/li>\n\n\n\n<li>JavaScript<br><\/li>\n\n\n\n<li>CSS<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These make up a large chunk of modern websites these days and all of these can be compressed by server-side compression algorithms.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the other hand, <strong>most image formats<\/strong> (jpg, png, etc.), most <strong>audio<\/strong> formats (mp3s) and other <strong>non-text binary files are already compressed<\/strong>. Compressing these won\u2019t make any difference so regardless of the Accept-Encoding header, servers will send these as it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As stated above, most modern web browsers will accept 3 main compression algorithms. Most servers have now migrated to one or both of the two most popular ones,<strong> Gzip and Brotli.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-gzip-compression\"><span class=\"ez-toc-section\" id=\"what-is-gzip-compression\"><\/span><strong>What is Gzip Compression?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The two most common compression algorithms are Gzip and Brotli. Gzip is the oldest and most common of the two. It was written by Jean-loup Gailly and Mark Adler. The initial beta release was made in 1992. The first actual version, version 1.0, was released in early 1993.&nbsp; back in 1992 just as the web was coming online for most people.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Gzip was designed as an<strong> all-purpose compression library<\/strong>. The theories behind Gzip were based on the earlier compression algorithm, DEFLATE.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because of its popularity &#8211; and the fact that it is very good at making files small &#8211; it is <strong>still<\/strong> <strong>widely used today <\/strong>both in different operating systems as well as a primary compression algorithm for <a href=\"https:\/\/www.siteground.com\/kb\/what-is-web-server\/\" data-type=\"URL\" data-id=\"https:\/\/www.siteground.com\/kb\/what-is-web-server\/\">web servers<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-brotli-compression\"><span class=\"ez-toc-section\" id=\"what-is-brotli-compression\"><\/span><strong>What is Brotli Compression?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Brotli was developed by Google employees Jyrki Alakuijala and Zolt\u00e1n Szabadka in 2013. Google was originally looking for a better way to compress WOT files which are web fonts.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Gzip was originally intended to compress files and has been adapted to compressing streams so it could work on the web. Brotli on the other hand,&nbsp; was designed from the beginning to <strong>compress streams<\/strong>. This makes it a <strong>better choice for web servers<\/strong> to compress content before streaming it to a browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In 2015, Google released the <strong>Brotli specification for HTTP<\/strong>. In addition to specifying how the browser should notify the server that it can decompress Brotli by sending a <em>\u201cContent-Encoding: br\u201d<\/em> header, Google engineers also made other improvements to Brotli that made it even <strong>faster for compressing web content<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-s-the-difference-between-brotli-and-gzip-compression\"><span class=\"ez-toc-section\" id=\"whats-the-difference-between-brotli-and-gzip-compression\"><\/span><strong>What\u2019s The Difference Between Brotli and Gzip Compression?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While they both have their origins in the LZ77 algorithm, <strong>Gzip was designed specifically to compress files<\/strong>. The library has been incorporated into a lot of different programs that need to compress files. The library was incorporated into web servers as compressing content started to be the norm. It was one of two compression algorithms specified in RFC 2616, the HTTPS 1.1 specification. While it wasn\u2019t specifically designed for streaming operations like web servers, it was adapted to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Brotli<\/strong>, on the other hand, <strong>was specifically designed for the web<\/strong>. Google recognized the need for a way to compress streams more efficiently so they designed Brotli.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both algorithms do a good job at what they were designed to do. Gzip still continues to be used on the web because it is still better than nothing at all. However, as Brotli grows in popularity, <strong>more and more web servers are preferring Brotli over Gzip<\/strong>. Given the choice of the two, Brotli is the default many servers will use. It&#8217;s been <a href=\"https:\/\/newblog.siteground.com\/en\/brotli-compression\/\" data-type=\"post\" data-id=\"14086\" target=\"_blank\" rel=\"noopener\">the default choice on all SiteGround servers<\/a> for a while now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the following video for more reference on the differences between Brotli and Gzip!<\/p>\n\n\n\n<iframe width=\"100%\" height=\"330\" data-cookieblock-src=\"https:\/\/www.youtube.com\/embed\/BMCvMWqoivs?si=oy_L8NGRY7C1wpde\" data-cookieconsent=\"marketing\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen=\"\"><\/iframe>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-benchmarking-brotli-and-gzip\"><span class=\"ez-toc-section\" id=\"benchmarking-brotli-and-gzip\"><\/span><strong>Benchmarking Brotli And Gzip<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When Brotli was benchmarked against gzip, it was found that it compresses files better:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>14% smaller JavaScript files<br><\/li>\n\n\n\n<li>21% smaller HTML files<br><\/li>\n\n\n\n<li>17% smaller CSS files<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Since <strong>Brotli <\/strong>was designed to compress streams on the fly, it <strong>is faster at both compressing content on the server and decompressing<\/strong> <strong>it in the browser<\/strong> than in gzip. In some cases the overall front-end decompression is up to 64% faster than gzip.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-can-i-enable-compression-on-my-website\"><span class=\"ez-toc-section\" id=\"how-can-i-enable-compression-on-my-website\"><\/span><strong>How Can I Enable Compression On My Website?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In simple terms, \u201cturning on compression\u201d simply means telling your web server to compress everything before it sends it to a browser that has announced it can handle compression.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are a server administrator, you know how to edit config files. If you are not a server administrator, skip this section and scroll straight to the &#8220;If I am not a server administrator&#8221; section below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-if-i-use-apache\"><strong>If I Use Apache<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using the Apache web server, there are<strong> 2 steps<\/strong> to enabling Brotli compression:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Firstly, enable the apache Brotli module. It is included by default but may not be enabled:<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>$ sudo a2enmod brotli&nbsp;<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next, you need to edit your web hosts config file and tell the server what you want to apply the compression to:<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&lt;IfModule mod_brotli.c&gt;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>AddOutputFilterByType BROTLI_COMPRESS text\/html text\/plain text\/xml text\/css text\/javascript application\/javascript<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&lt;\/IfModule&gt;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the example above, we are telling the web server to compress:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HTML<br><\/li>\n\n\n\n<li>Plain Text<br><\/li>\n\n\n\n<li>CSS<br><\/li>\n\n\n\n<li>JavaScript<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These are the main types of files that can be compressed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-if-i-use-nginx\"><strong>If I Use Nginx<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx is another very popular web server. Like Apache, it is controlled by config files. You need to locate your <em>nginx.conf<\/em> file and <strong>add the following two lines:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>load_module modules\/ngx_http_brotli_filter_module.so;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>load_module modules\/ngx_http_brotli_static_module.so;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then in your website\u2019s individual conf file, you need to add the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brotli on;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brotli_static on;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brotli_types *;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After making the changes, either Apache or Nginx, restart your web server and now it will respond with a <em>\u201cContent-Encoding\u201d<\/em> header if the browser sends a <em>\u201cAccept-Encoding\u201d <\/em>header.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-if-i-am-not-a-server-administrator\"><strong>If I Am Not A Server Administrator<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you are not a server administrator, it\u2019s actually much easier for you to enable compression on your server. <strong>You simply pick a host like SiteGround <\/strong>that <a rel=\"noopener\" href=\"https:\/\/newblog.siteground.com\/en\/brotli-compression\/\" target=\"_blank\" data-type=\"post\" data-id=\"14086\">turns it on by default<\/a>. It\u2019s that easy.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most top-tier hosts like SiteGround are interested in both making your site as fast as possible, and conserving as much bandwidth as possible. These are the two biggest benefits of enabling compression. Therefore, top-tier hosts turn on compression by default.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are not a SiteGround client, then you need to make sure that your web host turns on compression on your web server. If they don\u2019t and they won\u2019t turn it on for you, it\u2019s time to find a new host.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-can-i-test-brotli-and-gzip-compression\"><span class=\"ez-toc-section\" id=\"how-can-i-test-brotli-and-gzip-compression\"><\/span><strong>How Can I Test Brotli and Gzip Compression?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So how can you tell if compression is turned on for your website? There are a couple of ways to do this.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-hard-way\"><strong>The Hard Way<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open a browser. I\u2019m going to use Chrome in this example but the concept will work with any browser. The names of the options might change a little though between brands of browsers.<br><\/li>\n\n\n\n<li>Right click anywhere on the browser and select <strong>\u201cInspect\u201d<\/strong><br><\/li>\n\n\n\n<li>This will open a window on the side or bottom and it is a very busy window. The window has several tabs with names like this.<br>\n<ul class=\"wp-block-list\">\n<li>Elements<br><\/li>\n\n\n\n<li>Console<br><\/li>\n\n\n\n<li>Sources<br><\/li>\n\n\n\n<li>Network<br><\/li>\n\n\n\n<li>Performance<br><\/li>\n\n\n\n<li>Etc&#8230;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/image_1-1024x295-1.png\" alt=\"Network tab\" class=\"wp-image-15510\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Find the <strong>\u201cNetwork\u201d<\/strong> tab.<br><\/li>\n\n\n\n<li>In the URL box above, enter your website\u2019s URL and press enter. This is going to fill the network tab with a lot of different records. Scroll back up to the very first record. It should just be the name of your domain.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/image_2-1024x365-1.png\" alt=\"Find your domain in the network tab\" class=\"wp-image-15511\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on that first record.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/image_3-1024x945-1.png\" alt=\"Click on the first record in the network tab\" class=\"wp-image-15512\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate the<em> \u201caccept-encoding\u201d<\/em> header. It will be located in the <strong>\u201cRequest Headers\u201d<\/strong> section. These are the headers that your browser sent to the server. If you don\u2019t have this header then try a different browser because the server won\u2019t compress if the browser doesn\u2019t send the compression header.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/image_4-1024x749-1.png\" alt=\"Locate Response Headers in the Network Tab\" class=\"wp-image-15528\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Finally, locate the <em>\u201ccontent-encoding\u201d<\/em> header. This will be located in the <strong>\u201cResponse Headers\u201d<\/strong> section. These are the headers that your server sent to the browser before it sent your website. This tells the browser that the server chose Brotli as the compression and it should uncompress the content streams as they come in before displaying them.<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Honestly, most developers &#8211; myself included &#8211; do it this way. Yes, for the uninitiated, it is the hard way. If you don\u2019t normally use the Inspect tab to dig into the conversation that your browser and the server are having then it can be confusing. However, once you understand what to look for and where, this way requires very little effort and is available everywhere.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-easy-way\"><strong>The Easy Way<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Still, there are those people who are not comfortable doing it this way. For those of you that are reading this article and fall into this category, I present to you, the easy way.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Point a browser at the URL <a href=\"https:\/\/www.giftofspeed.com\/gzip-test\/\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.giftofspeed.com\/gzip-test\/<\/a><br><\/li>\n\n\n\n<li>Enter your website\u2019s domain name in the box provided.<br><\/li>\n\n\n\n<li>Click the <strong>\u201cCheck\u201d<\/strong> button.<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Seriously, that\u2019s it. When checking my site, I got the following results.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/image_5-1024x646-1.png\" alt=\"Check if Brotli is enabled \" class=\"wp-image-15514\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not only does this tell me that my web server is capable of encoding my website in Brotli, it also tells me that 80.66% of my website came across encrypted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrap-up\"><span class=\"ez-toc-section\" id=\"wrap-up\"><\/span><strong>Wrap Up<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Compression in websites is now the norm because it helps your site load faster.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Currently, Brotli is the best compression algorithm available for websites. If you see you are not offering Brotli, move to a <a href=\"https:\/\/www.siteground.com\/web-hosting.htm\" data-type=\"URL\" data-id=\"https:\/\/www.siteground.com\/web-hosting.htm\">web hosting<\/a> partner that has it enabled. A hosting partner like SiteGround! You can get +15-20% smaller files with Brotli and smaller files mean a faster loading website. Check out more about SiteGround\u2019s implementation in our article, <a rel=\"noopener\" href=\"https:\/\/newblog.siteground.com\/en\/brotli-compression\/\" data-type=\"post\" data-id=\"14086\" target=\"_blank\">More Site Speed Gains with Brotli Compression Algorithm.<\/a> You can also harness all of our other <a rel=\"noopener\" href=\"https:\/\/www.siteground.com\/technology#speed-booster\" target=\"_blank\">speed boosters<\/a> that will make your site fly.<\/p>\n\n\n<p>[subscribe_cta]<\/p>\n<\/p>","protected":false},"excerpt":{"rendered":"<p>Are you looking for free ways to make your website faster? One way that every website owner can get a little free speed is to turn on compression at the server. When both the webserver and the browser it is conversing with understand a common compression algorithm, then the data that is actually sent over &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site&#8221;<\/span><\/a><\/p>\n","protected":false},"author":35,"featured_media":15515,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-15508","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v28.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site - SiteGround Academy<\/title>\n<meta name=\"description\" content=\"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli vs Gzip compression, why Brotli is better and how to enable it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Difference Between Brotli And GZIP Compression Algorithms To Speed Up Your Site\" \/>\n<meta property=\"og:description\" content=\"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli and Gzip compression, why Brotli is better and how to enable it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/\" \/>\n<meta property=\"og:site_name\" content=\"SiteGround\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/siteground\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-09T12:53:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-03T08:24:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/newblog.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/fb_1200x630.png\" \/>\n<meta name=\"author\" content=\"Cal Evans\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"The Difference Between Brotli And GZIP Compression Algorithms To Speed Up Your Site\" \/>\n<meta name=\"twitter:description\" content=\"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli and Gzip compression, why Brotli is better and how to enable it.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/newblog.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/tw_1200x675.png\" \/>\n<meta name=\"twitter:creator\" content=\"@siteground\" \/>\n<meta name=\"twitter:site\" content=\"@siteground\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cal Evans\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/\"},\"author\":{\"name\":\"Cal Evans\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#\\\/schema\\\/person\\\/ac2ec9d82232836e1c87de042cfea852\"},\"headline\":\"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site\",\"datePublished\":\"2022-02-09T12:53:31+00:00\",\"dateModified\":\"2025-06-03T08:24:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/\"},\"wordCount\":1853,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/02\\\/blog_1200x600-1.jpg\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/\",\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/\",\"name\":\"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site - SiteGround Academy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/02\\\/blog_1200x600-1.jpg\",\"datePublished\":\"2022-02-09T12:53:31+00:00\",\"dateModified\":\"2025-06-03T08:24:20+00:00\",\"description\":\"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli vs Gzip compression, why Brotli is better and how to enable it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#primaryimage\",\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/02\\\/blog_1200x600-1.jpg\",\"contentUrl\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/02\\\/blog_1200x600-1.jpg\",\"width\":1200,\"height\":600,\"caption\":\"Brotli VS Gzip\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/brotli-vs-gzip-compression\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/\",\"name\":\"SiteGround Academy\",\"description\":\"The SiteGround academy provides a wide variety of tips, tools, and resources related to WordPress, web performance, website optimization and site security.\",\"publisher\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#organization\",\"name\":\"SiteGround\",\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2025\\\/01\\\/Siteground-Logo-on-white.jpg\",\"contentUrl\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2025\\\/01\\\/Siteground-Logo-on-white.jpg\",\"width\":1200,\"height\":400,\"caption\":\"SiteGround\"},\"image\":{\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/siteground\",\"https:\\\/\\\/x.com\\\/siteground\",\"https:\\\/\\\/www.instagram.com\\\/siteground\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@siteground\"],\"description\":\"The SiteGround academy provides a wide variety of tips, tools, and resources related to WordPress, web performance, website optimization and site security.\",\"foundingDate\":\"2004-03-22\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"501\",\"maxValue\":\"1000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/#\\\/schema\\\/person\\\/ac2ec9d82232836e1c87de042cfea852\",\"name\":\"Cal Evans\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g\",\"caption\":\"Cal Evans\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/calevans\\\/\"],\"url\":\"https:\\\/\\\/academy.siteground.com\\\/en\\\/author\\\/calevans\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site - SiteGround Academy","description":"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli vs Gzip compression, why Brotli is better and how to enable it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/","og_locale":"en_US","og_type":"article","og_title":"The Difference Between Brotli And GZIP Compression Algorithms To Speed Up Your Site","og_description":"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli and Gzip compression, why Brotli is better and how to enable it.","og_url":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/","og_site_name":"SiteGround","article_publisher":"https:\/\/www.facebook.com\/siteground","article_published_time":"2022-02-09T12:53:31+00:00","article_modified_time":"2025-06-03T08:24:20+00:00","og_image":[{"url":"https:\/\/newblog.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/fb_1200x630.png","type":"","width":"","height":""}],"author":"Cal Evans","twitter_card":"summary_large_image","twitter_title":"The Difference Between Brotli And GZIP Compression Algorithms To Speed Up Your Site","twitter_description":"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli and Gzip compression, why Brotli is better and how to enable it.","twitter_image":"https:\/\/newblog.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/tw_1200x675.png","twitter_creator":"@siteground","twitter_site":"@siteground","twitter_misc":{"Written by":"Cal Evans","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#article","isPartOf":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/"},"author":{"name":"Cal Evans","@id":"https:\/\/academy.siteground.com\/en\/#\/schema\/person\/ac2ec9d82232836e1c87de042cfea852"},"headline":"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site","datePublished":"2022-02-09T12:53:31+00:00","dateModified":"2025-06-03T08:24:20+00:00","mainEntityOfPage":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/"},"wordCount":1853,"commentCount":1,"publisher":{"@id":"https:\/\/academy.siteground.com\/en\/#organization"},"image":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#primaryimage"},"thumbnailUrl":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/blog_1200x600-1.jpg","articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/","url":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/","name":"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site - SiteGround Academy","isPartOf":{"@id":"https:\/\/academy.siteground.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#primaryimage"},"image":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#primaryimage"},"thumbnailUrl":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/blog_1200x600-1.jpg","datePublished":"2022-02-09T12:53:31+00:00","dateModified":"2025-06-03T08:24:20+00:00","description":"Looking for free ways to make speed up your site? Turn on compression! Learn about Brotli vs Gzip compression, why Brotli is better and how to enable it.","breadcrumb":{"@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#primaryimage","url":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/blog_1200x600-1.jpg","contentUrl":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2022\/02\/blog_1200x600-1.jpg","width":1200,"height":600,"caption":"Brotli VS Gzip"},{"@type":"BreadcrumbList","@id":"https:\/\/academy.siteground.com\/en\/brotli-vs-gzip-compression\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/academy.siteground.com\/en\/"},{"@type":"ListItem","position":2,"name":"The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site"}]},{"@type":"WebSite","@id":"https:\/\/academy.siteground.com\/en\/#website","url":"https:\/\/academy.siteground.com\/en\/","name":"SiteGround Academy","description":"The SiteGround academy provides a wide variety of tips, tools, and resources related to WordPress, web performance, website optimization and site security.","publisher":{"@id":"https:\/\/academy.siteground.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/academy.siteground.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/academy.siteground.com\/en\/#organization","name":"SiteGround","url":"https:\/\/academy.siteground.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/academy.siteground.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2025\/01\/Siteground-Logo-on-white.jpg","contentUrl":"https:\/\/academy.siteground.com\/en\/wp-content\/uploads\/sites\/2\/2025\/01\/Siteground-Logo-on-white.jpg","width":1200,"height":400,"caption":"SiteGround"},"image":{"@id":"https:\/\/academy.siteground.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/siteground","https:\/\/x.com\/siteground","https:\/\/www.instagram.com\/siteground\/","https:\/\/www.youtube.com\/@siteground"],"description":"The SiteGround academy provides a wide variety of tips, tools, and resources related to WordPress, web performance, website optimization and site security.","foundingDate":"2004-03-22","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"501","maxValue":"1000"}},{"@type":"Person","@id":"https:\/\/academy.siteground.com\/en\/#\/schema\/person\/ac2ec9d82232836e1c87de042cfea852","name":"Cal Evans","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6db3157414eef0b296f19e7ee76dffbe3280ba0e04d11c3a23c2db4523fd4948?s=96&d=mm&r=g","caption":"Cal Evans"},"sameAs":["https:\/\/www.linkedin.com\/in\/calevans\/"],"url":"https:\/\/academy.siteground.com\/en\/author\/calevans\/"}]}},"_links":{"self":[{"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/posts\/15508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/comments?post=15508"}],"version-history":[{"count":3,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/posts\/15508\/revisions"}],"predecessor-version":[{"id":23901,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/posts\/15508\/revisions\/23901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/media\/15515"}],"wp:attachment":[{"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/media?parent=15508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/categories?post=15508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.siteground.com\/en\/wp-json\/wp\/v2\/tags?post=15508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}