Disable Gzip compression for Magento
My Magento site is running on a VPS with
Server version: Apache/2.4.23 (Unix)
PHP Version => 5.5.38
The following optimization in place:
Merge JS/CSS
Magento compilation
Redis Server
Opcache
lesti FPC
Mod_Pagespeed
My site is quick enough https://gtmetrix.com/reports/www.modmybike.in/fdHza8gN but my ttfb is quite high and I want to reduce the TTFB. I am ready to sacrifice the under 2 sec page load speed for quicker connection and TTFB.
I believe the TTFB is high due to Gzip compression.
I have tried to remove the Apache Gzip compression by trying the following methods.
- Removed the text/html mime type from AddOutputFilterByType DEFLATE in .htaccess
- SetEnvIf Request_URI "(/)" no-gzip dont-vary in .htaccess
- Disabled mod_deflate entirely in .htaccess
- Moved from using .htaccess to httpd.conf and explicitly set "SetEnv no-gzip 1"
- Removed compress in Lesti::FPC
- Compression not enabled in Mod_Pagespeed.
Even with all the above attempts the Accept Encoding is still set to 'gzip, deflate'. I have been on this from last 2 weeks without any progress.
My only option i can think of is to rebuild Apache without mod_deflate.
Edit : Commented out #LoadModule mod_deflate in httpd.conf.
httpd -M still lists mod_defalte as a loaded module after restart.
Please help.
gzip
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
My Magento site is running on a VPS with
Server version: Apache/2.4.23 (Unix)
PHP Version => 5.5.38
The following optimization in place:
Merge JS/CSS
Magento compilation
Redis Server
Opcache
lesti FPC
Mod_Pagespeed
My site is quick enough https://gtmetrix.com/reports/www.modmybike.in/fdHza8gN but my ttfb is quite high and I want to reduce the TTFB. I am ready to sacrifice the under 2 sec page load speed for quicker connection and TTFB.
I believe the TTFB is high due to Gzip compression.
I have tried to remove the Apache Gzip compression by trying the following methods.
- Removed the text/html mime type from AddOutputFilterByType DEFLATE in .htaccess
- SetEnvIf Request_URI "(/)" no-gzip dont-vary in .htaccess
- Disabled mod_deflate entirely in .htaccess
- Moved from using .htaccess to httpd.conf and explicitly set "SetEnv no-gzip 1"
- Removed compress in Lesti::FPC
- Compression not enabled in Mod_Pagespeed.
Even with all the above attempts the Accept Encoding is still set to 'gzip, deflate'. I have been on this from last 2 weeks without any progress.
My only option i can think of is to rebuild Apache without mod_deflate.
Edit : Commented out #LoadModule mod_deflate in httpd.conf.
httpd -M still lists mod_defalte as a loaded module after restart.
Please help.
gzip
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
My Magento site is running on a VPS with
Server version: Apache/2.4.23 (Unix)
PHP Version => 5.5.38
The following optimization in place:
Merge JS/CSS
Magento compilation
Redis Server
Opcache
lesti FPC
Mod_Pagespeed
My site is quick enough https://gtmetrix.com/reports/www.modmybike.in/fdHza8gN but my ttfb is quite high and I want to reduce the TTFB. I am ready to sacrifice the under 2 sec page load speed for quicker connection and TTFB.
I believe the TTFB is high due to Gzip compression.
I have tried to remove the Apache Gzip compression by trying the following methods.
- Removed the text/html mime type from AddOutputFilterByType DEFLATE in .htaccess
- SetEnvIf Request_URI "(/)" no-gzip dont-vary in .htaccess
- Disabled mod_deflate entirely in .htaccess
- Moved from using .htaccess to httpd.conf and explicitly set "SetEnv no-gzip 1"
- Removed compress in Lesti::FPC
- Compression not enabled in Mod_Pagespeed.
Even with all the above attempts the Accept Encoding is still set to 'gzip, deflate'. I have been on this from last 2 weeks without any progress.
My only option i can think of is to rebuild Apache without mod_deflate.
Edit : Commented out #LoadModule mod_deflate in httpd.conf.
httpd -M still lists mod_defalte as a loaded module after restart.
Please help.
gzip
My Magento site is running on a VPS with
Server version: Apache/2.4.23 (Unix)
PHP Version => 5.5.38
The following optimization in place:
Merge JS/CSS
Magento compilation
Redis Server
Opcache
lesti FPC
Mod_Pagespeed
My site is quick enough https://gtmetrix.com/reports/www.modmybike.in/fdHza8gN but my ttfb is quite high and I want to reduce the TTFB. I am ready to sacrifice the under 2 sec page load speed for quicker connection and TTFB.
I believe the TTFB is high due to Gzip compression.
I have tried to remove the Apache Gzip compression by trying the following methods.
- Removed the text/html mime type from AddOutputFilterByType DEFLATE in .htaccess
- SetEnvIf Request_URI "(/)" no-gzip dont-vary in .htaccess
- Disabled mod_deflate entirely in .htaccess
- Moved from using .htaccess to httpd.conf and explicitly set "SetEnv no-gzip 1"
- Removed compress in Lesti::FPC
- Compression not enabled in Mod_Pagespeed.
Even with all the above attempts the Accept Encoding is still set to 'gzip, deflate'. I have been on this from last 2 weeks without any progress.
My only option i can think of is to rebuild Apache without mod_deflate.
Edit : Commented out #LoadModule mod_deflate in httpd.conf.
httpd -M still lists mod_defalte as a loaded module after restart.
Please help.
gzip
gzip
edited Jan 15 '17 at 8:28
Modmy
asked Jan 14 '17 at 22:26
ModmyModmy
212
212
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Accept Encoding
is a request header. This comes from your browser to the server telling the server that this browser will accept the gzip or deflate compression. If the server does compress the resource it will respond with Content-Encoding: gzip
.
I am doubtful that you will gain any speed-up with disabling gzip as it is very fast.
However, as this it is hard to tell exactly how to do this since I do not know whether you have only one web server, or a proxy as well which may be introducing compression, and what you actual configuration is...
It looks like you've already done some of this but here's what you should look at:
- .htaccess
- httpd.conf
- Virtual Host configuration file: somewhere in /etc/httpd/conf.d (take a look at httpd.conf for an include statement pointing to the directory where virtual host files may be located)
In general it seems that if you disable mod_deflate in httpd.conf you should be good, as is outlined here: https://scottlinux.com/2012/09/13/disable-http-compression-in-apache/
Debian/Ubuntu:
$ sudo a2dismod deflate
Module deflate disabled.
Run'/etc/init.d/apache2 restart'
to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Red Hat or CentOS:
$ sudo nano /etc/httpd/conf/httpd.conf
Comment out this line:
LoadModule deflate_module modules/mod_deflate.so
It should now look like this:
#LoadModule deflate_module modules/mod_deflate.so
Close and save the file then restart httpd:
$ sudo /etc/init.d/httpd restart
Hope this helps :)
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
add a comment |
Found that mod_deflate is a static module. Only an Apache rebuild can completely disable compression.
Moving on to setting up an Nginx stack now.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154759%2fdisable-gzip-compression-for-magento%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Accept Encoding
is a request header. This comes from your browser to the server telling the server that this browser will accept the gzip or deflate compression. If the server does compress the resource it will respond with Content-Encoding: gzip
.
I am doubtful that you will gain any speed-up with disabling gzip as it is very fast.
However, as this it is hard to tell exactly how to do this since I do not know whether you have only one web server, or a proxy as well which may be introducing compression, and what you actual configuration is...
It looks like you've already done some of this but here's what you should look at:
- .htaccess
- httpd.conf
- Virtual Host configuration file: somewhere in /etc/httpd/conf.d (take a look at httpd.conf for an include statement pointing to the directory where virtual host files may be located)
In general it seems that if you disable mod_deflate in httpd.conf you should be good, as is outlined here: https://scottlinux.com/2012/09/13/disable-http-compression-in-apache/
Debian/Ubuntu:
$ sudo a2dismod deflate
Module deflate disabled.
Run'/etc/init.d/apache2 restart'
to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Red Hat or CentOS:
$ sudo nano /etc/httpd/conf/httpd.conf
Comment out this line:
LoadModule deflate_module modules/mod_deflate.so
It should now look like this:
#LoadModule deflate_module modules/mod_deflate.so
Close and save the file then restart httpd:
$ sudo /etc/init.d/httpd restart
Hope this helps :)
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
add a comment |
Accept Encoding
is a request header. This comes from your browser to the server telling the server that this browser will accept the gzip or deflate compression. If the server does compress the resource it will respond with Content-Encoding: gzip
.
I am doubtful that you will gain any speed-up with disabling gzip as it is very fast.
However, as this it is hard to tell exactly how to do this since I do not know whether you have only one web server, or a proxy as well which may be introducing compression, and what you actual configuration is...
It looks like you've already done some of this but here's what you should look at:
- .htaccess
- httpd.conf
- Virtual Host configuration file: somewhere in /etc/httpd/conf.d (take a look at httpd.conf for an include statement pointing to the directory where virtual host files may be located)
In general it seems that if you disable mod_deflate in httpd.conf you should be good, as is outlined here: https://scottlinux.com/2012/09/13/disable-http-compression-in-apache/
Debian/Ubuntu:
$ sudo a2dismod deflate
Module deflate disabled.
Run'/etc/init.d/apache2 restart'
to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Red Hat or CentOS:
$ sudo nano /etc/httpd/conf/httpd.conf
Comment out this line:
LoadModule deflate_module modules/mod_deflate.so
It should now look like this:
#LoadModule deflate_module modules/mod_deflate.so
Close and save the file then restart httpd:
$ sudo /etc/init.d/httpd restart
Hope this helps :)
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
add a comment |
Accept Encoding
is a request header. This comes from your browser to the server telling the server that this browser will accept the gzip or deflate compression. If the server does compress the resource it will respond with Content-Encoding: gzip
.
I am doubtful that you will gain any speed-up with disabling gzip as it is very fast.
However, as this it is hard to tell exactly how to do this since I do not know whether you have only one web server, or a proxy as well which may be introducing compression, and what you actual configuration is...
It looks like you've already done some of this but here's what you should look at:
- .htaccess
- httpd.conf
- Virtual Host configuration file: somewhere in /etc/httpd/conf.d (take a look at httpd.conf for an include statement pointing to the directory where virtual host files may be located)
In general it seems that if you disable mod_deflate in httpd.conf you should be good, as is outlined here: https://scottlinux.com/2012/09/13/disable-http-compression-in-apache/
Debian/Ubuntu:
$ sudo a2dismod deflate
Module deflate disabled.
Run'/etc/init.d/apache2 restart'
to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Red Hat or CentOS:
$ sudo nano /etc/httpd/conf/httpd.conf
Comment out this line:
LoadModule deflate_module modules/mod_deflate.so
It should now look like this:
#LoadModule deflate_module modules/mod_deflate.so
Close and save the file then restart httpd:
$ sudo /etc/init.d/httpd restart
Hope this helps :)
Accept Encoding
is a request header. This comes from your browser to the server telling the server that this browser will accept the gzip or deflate compression. If the server does compress the resource it will respond with Content-Encoding: gzip
.
I am doubtful that you will gain any speed-up with disabling gzip as it is very fast.
However, as this it is hard to tell exactly how to do this since I do not know whether you have only one web server, or a proxy as well which may be introducing compression, and what you actual configuration is...
It looks like you've already done some of this but here's what you should look at:
- .htaccess
- httpd.conf
- Virtual Host configuration file: somewhere in /etc/httpd/conf.d (take a look at httpd.conf for an include statement pointing to the directory where virtual host files may be located)
In general it seems that if you disable mod_deflate in httpd.conf you should be good, as is outlined here: https://scottlinux.com/2012/09/13/disable-http-compression-in-apache/
Debian/Ubuntu:
$ sudo a2dismod deflate
Module deflate disabled.
Run'/etc/init.d/apache2 restart'
to activate new configuration!
$ sudo /etc/init.d/apache2 restart
Red Hat or CentOS:
$ sudo nano /etc/httpd/conf/httpd.conf
Comment out this line:
LoadModule deflate_module modules/mod_deflate.so
It should now look like this:
#LoadModule deflate_module modules/mod_deflate.so
Close and save the file then restart httpd:
$ sudo /etc/init.d/httpd restart
Hope this helps :)
answered Jan 15 '17 at 3:10
nikola99nikola99
48825
48825
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
add a comment |
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Thanks @nikola99. The link shared was my first attempt at disabling gzip. That didn't work. I am running only web server and no proxy server. I read elsewhere that Mod_deflate is part of Apache 2.4 hence thinking of Apache rebuild.
– Modmy
Jan 15 '17 at 7:45
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
Hmm, that's strange. Well, good luck to you! If I were you I would not spend too much time on this, since I am doubtful it will help you much. Also, gzipping your content is one of the recommendations to speed up your sites response.
– nikola99
Jan 15 '17 at 22:25
add a comment |
Found that mod_deflate is a static module. Only an Apache rebuild can completely disable compression.
Moving on to setting up an Nginx stack now.
add a comment |
Found that mod_deflate is a static module. Only an Apache rebuild can completely disable compression.
Moving on to setting up an Nginx stack now.
add a comment |
Found that mod_deflate is a static module. Only an Apache rebuild can completely disable compression.
Moving on to setting up an Nginx stack now.
Found that mod_deflate is a static module. Only an Apache rebuild can completely disable compression.
Moving on to setting up an Nginx stack now.
answered Jan 25 '17 at 15:39
ModmyModmy
212
212
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154759%2fdisable-gzip-compression-for-magento%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown