If you can use htaccess on your server and want to use gzip for faster Page Load Times / Bandwidth Saver. You can put the following lines in the htaccess file on your server:
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
This basically checks to see if mod_czip.c is found and if it is it will compress the files for you so they are faster to send to the browser. This supposedly speeds it up 35-40%. Then file sized supposedly go down 55-65%.





















































#1 by Abhishek Dilliwal on November 4, 2009 - 7:02 am
Hey thanks but wondering if my host provider does not support this module?
#2 by Kyle Welsby on November 12, 2009 - 5:30 am
Thank you for this fantastic post :)
#3 by Anthony on November 22, 2009 - 4:27 pm
Thanks for this!
I am going to try this now.
So in other words, If I have gzip uploaded to my server, I don’t have to do anything else besides add this to my .htaccess file?
#4 by A on November 22, 2009 - 4:53 pm
“This basically checks to see if mod_czip.c is found”
How do I go about making sure that mod_czip.c is found on my server? I download Gzip and uploaded, but I do not see mod_czip.c included in the file anywhere.
#5 by Harry on December 27, 2009 - 6:50 am
Great. Thanks. Using both of YSlow and Google page speed makes your posting valueable for me.
#6 by Waqqas Hanafi on December 30, 2009 - 1:52 pm
Gzip is great for compressing files but don’t think that it’ll always be the best option for you. Gzip adds processing overhead to the server, specially since these pages aren’t cached and are gzipped on the fly. As bandwidth gets cheaper, it really doesn’t make sense to sacrifice precious server processing time on gzipping. I would recommend caching gzipped pages and using the htaccess to serve those if they exist in a directory (such as /cache )