Home Website Fix Joomla Fix Why and How to Use Gzip Compression on Joomla

Why and How to Use Gzip Compression on Joomla

157
Why and How to Use Gzip Compression on Joomla

The answers to all your questions about Joomla Gzip compression.

When you are a web developer, having a solid foundation about the web would get you to places. You will be able to create powerful websites that novice developers can’t. This is the single most essential thing that will distinguish you from the amateurs. Therefore, let’s learn something fundamental today. What is Gzip, why should we use Gzip compression, how Gzip helps websites, and how to use Gzip on Joomla websites.

What is Gzip Compression?

The size of a webpage is what weight is to a physical object. We measure physical objects like bag/basket in Kg/lbs and vertical objects (web pages) in KB/MB. In the physical world, the more the size becomes the more energy it requires to move the object. Similarly, the more KB/MB of your web page becomes, the more (time) it takes to load a web page on the browser.

Gzip compression is brilliantly simple and extremely powerful. 

To put it in layman’s term, if you were going to lift a bag of 10 Kg, you’ll be needing a lot less energy when you are lifting a bag of 1 kg. That’s what Gzip compression is. It reduces the size (weight) of the web pages without decreasing the content quality.

Why Use Gzip Compression?

Since it’s established that the size of a web page determines how long it is going to take to load that page, we can go ahead and discuss how to reduce the size. This is where content-encoding comes into the picture. When as a user, you type something like google.com in the address bar of your browser and hit enter, the browser sends a request for the file http://www.google.com/index.html. Your browser then talks to the webserver. This is how it goes –

  • Browser: Hey, can you give me the /index.html
  • Server: Ok, let me see if index.html is around
  • Server: Found it! Here, I’m sending the response code and the file
  • Browser: 300KB? Crap… waiting, waiting… Ok, it’s loaded now

Why and How to use Gzip compression on Joomla

So you see, this is why we should use Gzip compression. When you use Gzip compression on your Joomla website. It improves performance and reduces the loading time dramatically. Say a 300KB web page can become 100KB if compressed. When a request is made for your website by a visitor, the server compresses the requested page and reduces its size significantly. And then sends it to the user’s computer. It’s the browser that does the decompressing and visualization in an extremely fast and unnoticeable way.

The time and resource spent on compressing/decompressing a webpage are significantly less than loading a large file. 

The algorithm of Gzip is brilliantly simple. It locates similar strings and replaces them temporarily. The reason it works like a charm when applied to web pages is, HTML/CSS files use a lot of repeated text. As Gzip compresses the common strings, it reduces the file size up to 70%.

How to Enable Gzip Compression in Joomla?

Since Joomla is an open-source CMS – built for the developers, by the developers. We are blessed to have powerful features already built in the system. To enable Gzip for your Joomla website go to the backend of your site.

Joomla backend > System > Global Configuration.

Why and How to use Gzip compression on Joomla

Then browse to the Server (tab) > Server Settings > Gzip Page Compression > and set the toggle to Yes.

Why and How to use Gzip compression on Joomla

How to Check If Gzip Is Properly Enabled?

When you have configured your site, how do you tell if the compression is working properly? Well, you don’t have to worry. There are plenty of tools available online to check that for you. Here’s one of the sites I frequently use to check if my website is properly Gzip enabled.

Why and How to use Gzip compression on Joomla

It is strongly advised that you use Gzip on your Joomla website. It helps to boost your website performance significantly. Which results in better user experience, better traffic and overall a better impression. Oh, did you know search engines care for the websites that have lighting loading speed? Yeap, that’s right! Enabling Gzip compression on your Joomla website even helps to rank better on Google.

What would you like to know next? Put your thoughts in the comments below and let us indulge your curiosity. 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

You cannot copy content of this page