Enabling GZIP compression possible?


New member
cPanel Username: arksof9s

URL: http://bioefectiva.com

Detailed Description: A way to enable GZIP

Tried with the htaccess file but it's not having any effect when I check it in http://checkgzipcompression.com/

I also found out it could be activated through CPanel but we don't have the Optimize menu.
The other option is through WHM but I know I don't have access to it.


Staff member
I have also tried some ways to GZIP my website, none of them worked.
Mabe Un4saken will help us :)



Thank you for bringing this to my attention. I'll be looking at this issue as soon as possible and let you know about the result.


New member
my site is gzip enabled http://checkgzipcompression.com/?url=http://www.ddlgen.net

in my php script i put this
if(!ob_start("ob_gzhandler")) { ob_start(); }

in my htaccess
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 10 days"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/plain "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-icon "access plus 1 year"

<IfModule mod_headers.c>
	Header append Vary User-Agent
	<FilesMatch "\.(js|css|xml|gz)$">
		Header append Vary: Accept-Encoding

# GZIP content to speed downloads
<ifmodule mod_deflate.c>
AddOutputFilter DEFLATE js css
	<FilesMatch "\.(js|css)$">
		SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript image/png image/jpeg image/gif application/x-shockwave-flash

# Begin gzip output
<IfModule mod_gzip.c>
    mod_gzip_on       Yes
    mod_gzip_dechunk  Yes
    mod_gzip_item_include file      \.(html?|txt|css|js|php|pl)$
    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.*
# End gzip


Staff member
Un4saken, you are the GOD :) Thanks for that my friend.

Ogah, thats cool, but you have done in such a weird way of doing this according what I have googled ages ago about it.


New member
iGdesigner said:
Ogah, thats cool, but you have done in such a weird way of doing this according what I have googled ages ago about it.

i only know that methods iG, but sometime in other hosting only use
if(!ob_start("ob_gzhandler")) { ob_start(); }
if we check with gzip output checker, they say webpage have gziped.

i hear if we use gzip we can save the server bandwidth and make faster load in browser, but use more processor/ram consumtion. is this true?