Solved

Enabling GZIP compression on magento/siteground

Posted on 2012-04-05
4
933 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now