Enable Gzip Compression

How to Enable Gzip Compression

Posted on

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

Gzip is a method of compressing files (reducing file size) so that data transfer over the network is faster and loads your site in just a few seconds. Gzip Compression is the most popular method for making your website faster by reducing more than 70-90% (claims from the Google Developers site) the size of your web page / blog. Gzip can compress CSS, JavaScript and HTML file types. Currently most websites have used Gzip Compression. Gzip Compression is one of the parameter evaluations on Google PageSpeed Insights and Yahoo YSlow.
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

Apache

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:

  1. Login to your cPanel
  2. Navigate to “Optimize Website”
    How to Enable Gzip Compression
  3. Chose Compress all content and click Update Settings.
    How to Enable Gzip Compression

Nginx

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.

Gravatar Image
Memberikan informasi dan Tutorial yang bermanfaat untuk para pemula, dan semua tutorial yang disajikan kami berikan secara gratis!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.