Most of the users having issue in website loading or load time is very high .Here I am explaining one method to speed up your website. There are several methods to speed up website one of them is Gzip compression and it is most popular method to load fast by compress page size of your site .
Here I am explaining how to setup gzip compression through .htaccess . One module Mod_deflate is an apache module that will be used to compress data using gzip compression
Check mod_deflate is installed and enabled in apache
Mod_deflate apache module will installed by default in apache server . Below is the command to check mod_deflate is installed and enabled .
For Debian Based System :
apache2ctl -t -D DUMP_MODULES | grep mod_deflate
For Linux ( CentOS/Red Hat ) :
httpd -t -D DUMP_MODULES | grep deflate_module
Output will be like below.
deflate_module (shared) Syntax OK
How to use mod_deflate ?
To use mod_deflate , I am adding few lines in .htaccess file .
Enabling mod deflate ( Gzip ) Compression in .htaccess
How to test if Gzip compression or mod_deflate is working ?
There are so many sites online which provide to help test whether mod_deflate or gzip compression is working or not .Find below one of the online test url.
Enter the URL and click on the “Test” button.Below is the example of online test snapshot.
I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks!