How to Gzip Joomla ?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Intern
- Posts: 66
- Joined: Sat Mar 21, 2009 7:12 am
How to Gzip Joomla ?
Hi there. I heard that if you gzip your joomla site, it will run faster ? How can i do this ?
Also, i heard that it puts more load on your cpu ? Well that really effect me...because my webhost is BlueHost, and cpu is THIER problem, right ? or will they come after me for slowing down thier cpu?
this is my webhost package....http://www.bluehost.com/tell_me_more.html
another question, how can i cache my site ? that is suppose to make it run faster too right.? and how long should i cache it for
Also, i heard that it puts more load on your cpu ? Well that really effect me...because my webhost is BlueHost, and cpu is THIER problem, right ? or will they come after me for slowing down thier cpu?
this is my webhost package....http://www.bluehost.com/tell_me_more.html
another question, how can i cache my site ? that is suppose to make it run faster too right.? and how long should i cache it for
- Hazzaa
- Joomla! Explorer
- Posts: 342
- Joined: Fri Nov 24, 2006 6:13 pm
Re: How to Gzip Joomla ?
Log in to your Joomla Admin panel, click Global configuration
CPU usage is YOU problem not theirs. They allow you so much load on the server and once you reach the limit your site is shut down for about 1 minute
I have anywhere between 300 and 2,000 users on my site at a time and have no issues. Unless your site has very high volume, I would not worry about GZip. Personally I never cache my site. Any modifications you make take longer to take effect. Again if you are not experiencing high volume, don't worry about
If you are not experiencing high volume but your site IS running slow, then you should look at which extensions you are running on your site and eliminate any troublesome ones
CPU usage is YOU problem not theirs. They allow you so much load on the server and once you reach the limit your site is shut down for about 1 minute
I have anywhere between 300 and 2,000 users on my site at a time and have no issues. Unless your site has very high volume, I would not worry about GZip. Personally I never cache my site. Any modifications you make take longer to take effect. Again if you are not experiencing high volume, don't worry about
If you are not experiencing high volume but your site IS running slow, then you should look at which extensions you are running on your site and eliminate any troublesome ones
- ooffick
- Joomla! Master
- Posts: 11616
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: How to Gzip Joomla ?
You can set the GZip setting here:
Global Configuration > Server > Server Settings > GZIP Page Compression
and the cache setting here:
Global Configuration > System > Cache Settings > Cache
Olaf
Global Configuration > Server > Server Settings > GZIP Page Compression
and the cache setting here:
Global Configuration > System > Cache Settings > Cache
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sun Apr 19, 2009 2:49 pm
Re: How to Gzip Joomla ?
Gzip Joomla has a great built in Gzip function. This will compress your site before it is sent out, making the site load even faster!
http://www.joomlarevolution.org/ Joomla Video Tutorials
Signature rules - Literal URL's only
Signature rules - Literal URL's only
- ooffick
- Joomla! Master
- Posts: 11616
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: How to Gzip Joomla ?
You might want to have a look at this post as well, it explains why running Gzip is cheaper and better:
http://paulbuchheit.[URL banned].com/2009/0 ... er-to.html
Olaf
http://paulbuchheit.[URL banned].com/2009/0 ... er-to.html
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
[quote]You can set the GZip setting here:
Global Configuration > Server > Server Settings > GZIP Page Compression
[quote]
this is just what is needed in order to get the page compressed?
after i searched in the web i saw other ways to enabling gzip
ps adding some lines in htaccess or in the index.php
Global Configuration > Server > Server Settings > GZIP Page Compression
[quote]
this is just what is needed in order to get the page compressed?
after i searched in the web i saw other ways to enabling gzip
ps adding some lines in htaccess or in the index.php
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
Would this feature depend on my server configurations?
Would someone mind to explain to me how can I test it to be sure it is enabled?
How can I know how many load time I'm saving?
Is this something that work the same way in all browsers?
Sorry, If I'm going a little away from the original conversation. I didn't mean to hijack the thread.
Would someone mind to explain to me how can I test it to be sure it is enabled?
How can I know how many load time I'm saving?
Is this something that work the same way in all browsers?
Sorry, If I'm going a little away from the original conversation. I didn't mean to hijack the thread.
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
to test if its enabled check here :http://www.whatsmyip.org/http_compression/
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
Thanks. This answers almost all I asked
The only thing left is: how can I compare the loading time of the normal and GZipped site?
Any clue about it? Thanks in advance.
The only thing left is: how can I compare the loading time of the normal and GZipped site?
Any clue about it? Thanks in advance.
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
there are many sites thats checks speed test... there is also this http://ferenc.biz/yslow-firefox-extension/
firefox addon..
firefox addon..
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
That won't exactly compare the normal and GZipped modes, will it?
But you've explained a lot already, so thanks. I guess I'll just research a little about that last part. If I ever find such a tool I'll post a link here.
Best regards.
But you've explained a lot already, so thanks. I guess I'll just research a little about that last part. If I ever find such a tool I'll post a link here.
Best regards.
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Explorer
- Posts: 413
- Joined: Sat Oct 10, 2009 2:28 pm
- Location: Medellin, Colombia
Re: How to Gzip Joomla ?
you are better served, and get more compression by using mod_deflate and turning off Joomla Gzip....servers will compress more data types than joomla...and do it more efficiently.
here is an example (working copy of a large joomla site) for mod_deflate.
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
DeflateCompressionLevel 1
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog /var/log/httpd/deflate_log deflate
</IfModule>
here is an example (working copy of a large joomla site) for mod_deflate.
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
DeflateCompressionLevel 1
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog /var/log/httpd/deflate_log deflate
</IfModule>
Retired IBM 360/370 Assembler TPF Systems Programmer
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
What file do I add that to? How can I check for mod_deflate functionality?
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Explorer
- Posts: 413
- Joined: Sat Oct 10, 2009 2:28 pm
- Location: Medellin, Colombia
Re: How to Gzip Joomla ?
this will be of help: http://www.howtoforge.com/apache2_mod_deflatenailson_imgn wrote: What file do I add that to? How can I check for mod_deflate functionality?
Retired IBM 360/370 Assembler TPF Systems Programmer
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
Thanks for the useful link.
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Explorer
- Posts: 413
- Joined: Sat Oct 10, 2009 2:28 pm
- Location: Medellin, Colombia
Re: How to Gzip Joomla ?
I normally do not install the reporting part....why add over head of writing stats that you can get from some performance websites.. so you could drop the follow:
Here is a site you can check you site's compression with: http://www.whatsmyip.org/http_compression/
also, raising the compression level above 1, generally has little affect on the overall compression but does add processor overhead...
Code: Select all
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog /var/log/httpd/deflate_log deflate
also, raising the compression level above 1, generally has little affect on the overall compression but does add processor overhead...
Retired IBM 360/370 Assembler TPF Systems Programmer
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
although i have enabled gzip from the backend of joomla my template.css is not compressed(reported by page speed/firebug). Is there a line limit ? because template.css has ~2000 lines.
Is there a way to make a specific file compression ?
Is there a way to make a specific file compression ?
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
mod_deflate is disabled in my server! but after i enable Gzip from the backend of joomla there is a kind of compression that starts. Is Joomlas Gzip different than mod_deflate?
should i ask from my host to enable mod_deflate ?
should i ask from my host to enable mod_deflate ?
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: How to Gzip Joomla ?
still havent understand how it works.. and if it work correctly. So i have enabled the backend joomla gzip option but.
my mootools.js seems to be not compressed,
http://www.whatsmyip.org/http_compression/ says that gzip is enabled and it saves 5kbs.
PageSpeed firefox plugin says that non css or js in compressed and that if i enabled it i will save 60Kb! :/
Is there a way to compress specific files? Another way to enabled it except from joomla back end?
my mootools.js seems to be not compressed,
http://www.whatsmyip.org/http_compression/ says that gzip is enabled and it saves 5kbs.
PageSpeed firefox plugin says that non css or js in compressed and that if i enabled it i will save 60Kb! :/
Is there a way to compress specific files? Another way to enabled it except from joomla back end?
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en
-
- Joomla! Enthusiast
- Posts: 152
- Joined: Tue Sep 21, 2010 2:39 pm
Re: How to Gzip Joomla ?
How is Cpanel's "optimize website" function (compressing data) related to the "mod_deflate" option, if at all, and how is this setting, if at all, related to the gzip setting?
Concerning the second question, I have a particular case in mind...
...in fact it does not concern Joomla actually, but I thought I would report it.
When I first enabled gzip in phpbb I got an error, saying that gzip was not enabled and I could no longer access the website...I had to change the relevant MySQL value to regain access.
After some time, and having enabled data compression through CPanel, this gzip setting in phpbb worked, so I wondered whether one is the precondition of the other...
From what I read here, it seems that it is not...(I enabled gzip in Joomla only after having enabled compression first in Cpanel, so I don't know how joomla would respond in the absence of the server setting)
Concerning the second question, I have a particular case in mind...
...in fact it does not concern Joomla actually, but I thought I would report it.
When I first enabled gzip in phpbb I got an error, saying that gzip was not enabled and I could no longer access the website...I had to change the relevant MySQL value to regain access.
After some time, and having enabled data compression through CPanel, this gzip setting in phpbb worked, so I wondered whether one is the precondition of the other...
From what I read here, it seems that it is not...(I enabled gzip in Joomla only after having enabled compression first in Cpanel, so I don't know how joomla would respond in the absence of the server setting)
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sun Jan 31, 2010 11:59 am
Re: How to Gzip Joomla ?
Hello,
I enabled mod_deflate and I put the following syntax:
- I checked the status on http://www.whatsmyip.org/http_compression/ and it looks fine, however when I run YSlow test it says:
I enabled mod_deflate and I put the following syntax:
Code: Select all
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
Any ideas?Compress components with gzip
There are 17 plain text components that should be sent compressed
* http://domain.com/components/xxx/css/xxx.css
* http://domain.com/components/xxx/css/xxx.css
* http://domain.com/components/xxx/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/templates/template/css/xxx.css
* http://domain.com/media/system/js/xxx.js
* http://domain.com/media/system/js/xxx.js
* http://domain.com/components/xxx/js/xxx.js
* http://domain.com/.../xxx.js
* http://domain.com/.../xxx.js
* http://domain.com/.../xxx.js
* http://domain.com/modules/xxx/js/xxx.js
-
- Joomla! Enthusiast
- Posts: 111
- Joined: Mon Jun 22, 2009 8:05 pm
Re: How to Gzip Joomla ?
I just discovered that I can gzip my site.
First question, why is this not the default? Why wouldn't everyone want to gzip their site? Are there issues I should be worried about if I am using gzip?
Also,
When I enable gzip, I still see a lot of spacing when I view the source of a page. Why is that? I thought it was compressed, shouldn't it all be nice and tight?
First question, why is this not the default? Why wouldn't everyone want to gzip their site? Are there issues I should be worried about if I am using gzip?
Also,
When I enable gzip, I still see a lot of spacing when I view the source of a page. Why is that? I thought it was compressed, shouldn't it all be nice and tight?
- agerix
- Joomla! Apprentice
- Posts: 11
- Joined: Wed Mar 24, 2010 2:13 pm
- Location: Bordeaux
- Contact:
Re: How to Gzip Joomla ?
Hi all,
really interresting discuss, thanx for all links and explainations
really interresting discuss, thanx for all links and explainations
adishatz, erix
https://www.agerix.fr
https://www.agerix.fr
- keliix06
- Joomla! Ace
- Posts: 1022
- Joined: Wed Aug 17, 2005 11:46 pm
- Location: Minneapolis, MN
- Contact:
Re: How to Gzip Joomla ?
If your server is overloaded, the extra CPU overhead of gzipping the site will slow it down way more than you'd have in any gains of the smaller download size. Running Gzip does require additional CPU timegarek007 wrote:I just discovered that I can gzip my site.
First question, why is this not the default? Why wouldn't everyone want to gzip their site? Are there issues I should be worried about if I am using gzip?
Also,
When I enable gzip, I still see a lot of spacing when I view the source of a page. Why is that? I thought it was compressed, shouldn't it all be nice and tight?
Doyle Lewis
BuyHTTP Internet Services
http://www.buyhttp.com/joomla_hosting.html - No Overselling Guarantee. Your Joomla site, faster.
http://www.joomlademo.com - 30 day free trial of Joomla
BuyHTTP Internet Services
http://www.buyhttp.com/joomla_hosting.html - No Overselling Guarantee. Your Joomla site, faster.
http://www.joomlademo.com - 30 day free trial of Joomla
-
- Joomla! Enthusiast
- Posts: 138
- Joined: Tue Nov 16, 2010 1:45 pm
- Location: hyderabad
- Contact:
Re: How to Gzip Joomla ?
If i enable Gzip , will this effect on my server CPU usage? i am using shared hosting,
Regards
- nailson_imgn
- Joomla! Guru
- Posts: 729
- Joined: Wed Apr 15, 2009 5:33 pm
- Location: Fortaleza, CE - Brasil
Re: How to Gzip Joomla ?
Yes, it will. However, it may reduce significantly the amont of data sent with every response. For instance, mooltools.js will drop 46.3KB and query.js wil drop 62.4KB. The more resources a website uses, the better it is to use GZIP or mod_deflate.
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Dec 13, 2011 2:58 am
- Location: Turkiye
- Contact:
Re: How to Gzip Joomla ?
I didnt see any advantages of gzip for my website.Benchmark values are same before and after.
-
- Joomla! Guru
- Posts: 500
- Joined: Mon Aug 11, 2008 3:05 pm
Re: How to Gzip Joomla ?
As a general rule everything that's not already compressed should be gzipped especially for static files like .js .css .txt.
If you create a .gz of the file using level 9 compression then your server does not need to deflate it each time it's served out because it first checks for the .gz file.
myscript.js
myscript.js.gz
You just need to remember that if you change myscript.js you need to create a new myscript.js.gz file because Apache does not compare dates.
It's also better to use mod_deflate to compress the code that Joomla generates, if you don't have mod_deflate then let php do it using the gzip option in Global Configuration.
What I have been doing for about the last year or so is to store the system-page-cache files as gzipped level 9. Then if the requesting browser can accept gzip I just echo out the file and it's already gzipped, plus it takes up a lot less storage space. The only drawback to that method is that you can not have a security token in the page because you can't use regexp to swap the saved one with the current one, so for example you can't use the log-in module on all of your pages.
If you create a .gz of the file using level 9 compression then your server does not need to deflate it each time it's served out because it first checks for the .gz file.
myscript.js
myscript.js.gz
You just need to remember that if you change myscript.js you need to create a new myscript.js.gz file because Apache does not compare dates.
It's also better to use mod_deflate to compress the code that Joomla generates, if you don't have mod_deflate then let php do it using the gzip option in Global Configuration.
What I have been doing for about the last year or so is to store the system-page-cache files as gzipped level 9. Then if the requesting browser can accept gzip I just echo out the file and it's already gzipped, plus it takes up a lot less storage space. The only drawback to that method is that you can not have a security token in the page because you can't use regexp to swap the saved one with the current one, so for example you can't use the log-in module on all of your pages.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Dec 13, 2011 2:58 am
- Location: Turkiye
- Contact:
Re: How to Gzip Joomla ?
It is a very important detail.Thank you for your warning.almooj-craig wrote:You just need to remember that if you change myscript.js you need to create a new myscript.js.gz file because Apache does not compare dates.
-
- Joomla! Guru
- Posts: 500
- Joined: Mon Aug 11, 2008 3:05 pm
Re: How to Gzip Joomla ?
Page Speed works good. While using the Firefox browser install the Firebug and Page Speed add ons. Then clear your cache and load the page you want to check. Press F12 and select Page Speed. You could then Analyze the Performance or check the Resources.