Solved

Enabling GZIP compression on magento/siteground

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ebay seller html tags 2 33
AWS EC2 & RDS Instance 5 52
Apache module 5 47
How to control cache of some js files ? 7 42
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective 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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

830 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