Solved

Enabling GZIP compression on magento/siteground

Posted on 2012-04-05
4
963 Views
Last Modified: 2012-04-19
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
0
Comment
Question by:Dean OBrien
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 37820633
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.
0
 
LVL 12

Author Comment

by:Dean OBrien
ID: 37821473
The link you provided states it is unable to uncompress the files. Any suggestions?
0
 
LVL 13

Accepted Solution

by:
LinuxGuru earned 500 total points
ID: 37822153
I could see gzip showing as enabled. Are you checking the main url or some other url? Check the attached screen shot.

Gzip Test
0
 
LVL 12

Author Closing Comment

by:Dean OBrien
ID: 37865133
Sorry for delay
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question