Link to home
Start Free TrialLog in
Avatar of Dean OBrien
Dean OBrienFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Enabling GZIP compression on magento/siteground

Experts,

I have a site hosted with siteground:
http://www.chic-osity.co.uk

I have followed steps provided by the hosting company to enable GZIP compression, namely adding the block below to .htaccess
<IfModule mod_gzip.c>
mod_gzip_static_suffix .gz
AddEncoding gzip .gz
AddEncoding gzip .gzip
mod_gzip_on YES
mod_gzip_handle_methods GET
mod_gzip_temp_dir /tmp
mod_gzip_can_negotiate Yes
mod_gzip_dechunk Yes
mod_gzip_send_vary On
mod_gzip_update_static No
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 250
mod_gzip_maximum_file_size 1048576
mod_gzip_maximum_inmem_size 60000
mod_gzip_min_http 1000
mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
mod_gzip_item_exclude file .js$
mod_gzip_item_exclude file .css$
mod_gzip_item_exclude mime ^application/pdf$
mod_gzip_item_exclude mime ^image/
mod_gzip_item_exclude mime ^application/x-javascript$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include file .html$
mod_gzip_item_include file .pl$
mod_gzip_item_include file .cgi$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include mime ^application/postscript$
</IfModule>

Open in new window


Then adding the following to the top of index.php:
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

Open in new window


They advise that gzip is working, because the following site states it to be the case:
http://www.whatsmyip.org/http-compression-test/

However, when i load the page in firebug, then perform a page speed analysis, it states that it is not enabled.

I am keen to do everything that i can to optimize the sites performance and increase load time, therefore any suggestion on how to do this would be greatly apprciated.

Regards
Easynow
Avatar of Linux Guru
Linux Guru
Flag of India image

Hi,

Could you please analyse the site in following url?

http://www.gidnetwork.com/tools/gzip-test.php

I have checked the server and gzip is enabled. Not sure about the coding part. You need to wait for some other experts to answer regarding this.
Avatar of Dean OBrien

ASKER

The link you provided states it is unable to uncompress the files. Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of Linux Guru
Linux Guru
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for delay