Start Gzip in .Htaccess to Speed Up Website

Gzip is to compress your webpage on server in order to your website. It will build a .gz zipped file on your server and then send it to webpage viewers. As the file is zipped, the download time will decrease a little. It also benefit for those websites which got a limited bandwidth. This post will tell you how to start Gzip by edit .htaccess.

There is a build in function in 2.5 and former edition. But 2.5 and over don’t added this function. So it’s the need to start Gzip by yourself. There are also some plugin help users do Gzip. Wp-Super-Cache is one of these plugins. However, I don’t want to cache my index page. So the index page is not Gzipped. And the idea to start Gzip by edit .htaccess will solve this problem.

If your server support ‘mod_deflate’ module, you can start Gzip by add this code to .htaccess file:

<ifmodule mod_deflate.c>
AddOutputFilter DEFLATE html xml php js css
</ifmodule>

If you installed WP Super Cache, you should turn off cache function in order to avoid conflict. I had used this idea on my website. It works fine on my site now.

留下评论







注意: 第一次留言的用户,您的评论需要审核通过才会显示,抱歉!