Hi to all, I was checking my website performance in Google webmaster tool, They suggest me to enable gzip compression on some pages of my website. But i don't know how do it. Can any one suggest me steps to do this.
There are a number of ways. If your site is php based it is not too difficult. But it can depend on the script you are using too. Some are easy others can be more time consuming and difficult. Your host should also have gzip - deflate available on the server most do but not all. If they don't you are probably out of luck. Standard html pages usually don't work so well. You can change or rewrite them to php then add gzip compression. Simplest is to just add <?php ob_start ("ob_gzhandler"); ?> at the top of php pages. There are other methods though, and some other methods for .css, .js, etc.
Here it is; <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?> Put it at the top. But your web server needs to support this code. For godaddy webhosting, it works.