Content Developer at PressMate September 29, 2017

How to enable GZIP compression

how to enable gzip compression

HTML and CSS files are the most crucial part of your website and can play a vital role in page size thus being a major factor contributing to page speed. Compressing these files can help you reduce the file size by 60% ultimately helping you load your page fast.

Large pages can have a size of upto 1MB or more making them bulky and slow to load. Gzip compression is the best way to speed up your website and is a standard practice to reduce your page size finally helping you optimize your page speed. Compression allows web server to provide you smaller file sizes which eventually leads to fast page loading.

What is Gzip compression ?

Gzip is a file format and software application used for  file compression and decompression. Gzip compresses your web pages and stylesheets before sending them to visitor’s browser. Since this process reduces your transfer time, there can be a remarkable increase in page loading speed.

The page loading speed is drastically improved as your visitors need to download much smaller web files compared to the original ones.

Gzip is recommended and can be used for following file formats :

  • CSS and Javascript
  • Textfiles (extension .txt)
  • Web services like WSDL, REST, JSON
  • HTML

However, Gzip compression is not recommended for non-text files like graphics and zip in terms of cost versus benefit.

Whenever a browser requests for files from a web server, it checks gzip enabled request. If it’s enabled, it receives the gzip file which is much smaller than original.Just in case, it the server fails to deliver a gzip compressed, your browser will receives the uncompressed version of file, thus making sure that there is no fall out.

Following are the important reasons to use Gzip compression :

  • It saves 50% to 80% bandwidth which significantly leads to fast page loading
  • Reduces the time to transfer file
  • Increases conversion rate

Gzip compression can be used with apache, WordPress, IIS, and a host of different servers.

However, let’s restrict our discussion on how to get this done with WordPress.

1. Ask your host to enable GZIP Compression

If you are not sure about how to do this and don’t want to mess around, just ping your hosting provider and ask them to get it done for you.

2. Enabling GZIP Compression Using .htaccess

This is the best and our recommended way to enable GZIP Compression. This will help you achieve your target without using a plugin. Just copy paste the following code into your .htaccess file. If you have no idea on how to edit .htaccess file, then take a look at this article by WinningWp.

3. Using W3 Total Cache

Total Cache also has way to enable GZIP Compression for you under its performance section. To enable Gzip compression using w3 total cache, go to Performance > Browser Cache

4. Using WP HTTP Compression Plugin

This is another great plugin to enable GZIP Compression. It can help you reduce your page size by 60% – 80%. You can download this plugin here. The best part about this plugin is that you just need to install it and wait for the magic to happen. This is best for anyone who is not looking for something complicated.

5. DEFLATE Compression

DEFLATE Compression is another way of lossless data compression algorithm. You can use Deflate Compression by copy pasting the following code into your .htaccess file.

Now that you have enabled GZIP Compression, it’s time to check out if it is working or not. You can check if GZIP Compression is enabled or not by logging onto Check GZIP Compression.

I hope this article will help you in understanding the concepts of GZIP Compression and various methods to enable for you website. So, have a great day ahead and happy GZIPPPING !!!

The other thing to look at when doing an essay for sale is that the article itself should be unique.


Enjoyed the article?

Press 💚 below and join the other 13,000+ getting valuable updates from this blog.

Get Free Site Analysis

Want us to analyze your site first and then use our services? No worries. Just fill out the form to the right and we will be happy to send you a free report about your current website.