Wiredelta

What is GZIP compression?

GZIP compression is a data-compressing process through which the size of a file is reduced before it is transferred from the server to the browser. So, a GZIP compressed file is smaller in size when compared to the original, thus the browser renders its contents faster.

 

Moreover, compressing files using GZIP is a strategy recommended by Google, as it helps with better performance on all text-based CSS, JavaScript, and HTML assets. But more importantly, this compression process is supported by all modern browsers, not just by Google. However, the server should be configured to enable GZIP compression, and some CDNs might require a bit of special care.

 

How does GZIP Compression work?

Any website owner can use GZIP compression on their website or blog. During the process, the file is compressed and encoded while on the server, then any data repeatedly found is replaced with a unique identifier. This includes repetitive data like HTML and CSS code, which usually has plenty of white spaces and similar text-based content. Thus the encoded files take up less space.

 

So, because the GZIP compressed file HTTP request size is reduced, it significantly decreases the loading time of the web page. In simple terms, when the file size is compressed or reduced, the process of transferring files becomes faster. However, it is important to note that GZIP compression does not work on image files. For images, web owners have to reduce the size using other tools, like tinypng.com or other image optimizers like it.

 

The unique identifiers are decoded back to the original size of the data when the file is unzipped.

 

When should you use GZIP Compression?

Ideally, you should enable GZIP compression when first making your website public. However, if you haven’t, you should consider GZIP compression when you start noticing that the website is loading slowly, or whenever you are optimizing it.

 

If you are not sure if your website has GZIP enabled, it is easy to find out using the Google developer/inspection tool. First, open your website in Google Chrome. To open the developer tool, right-click anywhere on the page and select Inspect. then go to Network in the top bar and press Ctrl/Cmd+R to reload the page.

 

whatisgzipcompressionwiredelta.com

 

Once the page fully loaded, your results should look something like the screenshot above. Under Response Headers, check the content-encoding status. If it says gzip, then your website has GZIP enabled. It’s as simple as that.

 

Is GZIP Compression efficient?

The answer is a definite yes! According to Google, using GZIP to compress your HTML and CSS files will save an estimated 70-90 percent of the original file size. And we can see that by doing a simple check using a website analyzing tool like app.wiredelta.com. In our example, the website owner saved 82.7% of the original webpage size, reducing is from 174 to 30 KB. That is quite impressive.

 

Wiredelta website analysis tool

 

However, there are two main reasons why reducing the file size is important – loading speed is one, and then there is bandwidth. In other words, how much space does a file takes on your servers, and how fast is it presented to your users. Naturally, a large file will occupy more space, and it will take more bandwidth whenever a user accesses it. This will cost you more, but it will also slow down your page speed, affect your user experience, and ultimately your Google Rank. But By simply using GZIP, you avoid all of those issues. So, is GZIP efficient? Yes, yes it is. Should you enable it on your website? Absolutely

 

Is GZIP Compression good for SEO?

As established from the metrics above, one of the main advantages of GZIP compression is that it optimizes your page for speed. And, since page speed is critical when it comes to SEO and Google ranking of web pages then your answer is yes. Even more so, slow loading web pages contribute to bad user experience and a high bounce rate. And while this is not yet an official ranking factor, starting in 2021 it will be.

 

The point is that Google could penalize your site because of bad UX and slow loading speed by lowering your page ranking. And with that, all your overall SEO strategy efforts are going down the drain.

 

How to enable GZIP Compression?

GZIP compression can be enabled in several ways including and not limited to the use of a plugin, via web host cPanel, .htaccess, LiteSpeed Web Servers, Nginx, and Apache. And while we strongly recommend using a developer or an agency that has experience with this process, there are a few simple ways of enabling GZIP compression on your own.

 

1. Use .htaccess to enable GZIP Compression 

First, login into your hosting website and then into your cPanel. Then, open the file manager and go to the public_html/www path. In there, find the .htaccess file and copy and paste the code below after any other instructions that are already in the .htaccess file.

 

Use .htaccess to enable GZIP compression

 

2. Use a plugin to enable GZIP Compression on a WordPress website

Those with WordPress websites can use a plugin of their choice. All you have to do is log into your WordPress dashboard and go to Plugins. Search for an appropriate GZIP compression plugin or upload the plugin file, if you already downloaded one.

 

Use a plugin to enable GZIP compression on a WordPress website

 

Then, click on Installed and activate the plugin in the dashboard sidebar. You will see a list with all of your active plugins where you will find your new GZIP plugin, and next to it the word ‘Enable’. Click on the enable checkbox and then the ‘update’ button below to finish enabling GZIP on your WordPress website.

 

3. Use cPanel to enable GZIP Compression 

For this third method, it is once again recommended you employ the help of your hosting company, However, if you want to enable GZIP o your own, login into your cPanel and scroll down until you reach the section titled software. Other hosting companies have titled section software and services.

 

Use cPanel to enable GZIP compression

 

Then select Optimize Website, and from the three options that appear choose Compress All Content! Lastly, click on ‘update settings’ and that is it. Congratulations, you have successfully enabled GZIP on your website.

Success stories

In the past decade we have launched over 100 websites and more than 20 mobile apps, helping each of our client get closer to their digital goals.

Executive Global
Network

Connecting executives around the world in one of the largest professional networks

Philip Morris
International

Working together towards a smoke-free future for the Nordics.

Ønskeskyen
(GoWish)

Denmark’s largest wish cloud is going global with a brand new look and a lot of new features

How can we bring you value?