Enable Gzip Compression – In this tutorial we will discuss how to enable Gzip Compression feature on your web server so that it can increase the speed of your website. There are two ways to activate Gzip Compression by configuring the cpanel or changing the .htaccess file.
What is Gzip Compression
There are several benefits obtained by activating Gzip Compression.
Advantage Enable Gzip Comppression
- Preferred by search engines.
- Your server no longer has a large request to process.
- The size of your website will be reduced by 70-90%.
- Increase the load speed of your website.
How it Works?
Gzip is actually a fairly simple idea that is very powerful when used properly. Gzip places the same string in a text file and replaces the string temporarily to make the whole file size smaller.
The reason gzip works well in a web environment is because CSS files and HTML files use a lot of repetitive text and have lots of spaces. Because gzip compresses common strings, it can reduce page size and style sheets to 70-90%!
When the browser visits the web server, the browser will check and see if the server has activated the gzip compression method and then asks for a web page. If gzip is activated, the browser will receive a smaller gzip file and if gzip is not activated the browser will receive a much larger file.
How to Enable Gzip Compression
Make sure the mod_deflate module is active on your server then paste or add the script below to your .htaccess file
For cPanel users, you can activate it through the menu in cPanel. Next is how to activate Gzip Compression on your Cpanel:
- Login to your cPanel
- Navigate to “Optimize Website”
- Chose Compress all content and click Update Settings.
Insert or add the script below to your .htaccess file
After enable Gzip Compression you need to check whether Gzip Compression is enable or not, to check it, you can use online tools bellow:
That’s it, hope you can get it all running without a problem, and enjoy your webiste speed.
By the way, don’t forget to subscribe my blog. It should giving you much information.