The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to Gzip Joomla ?
PostPosted: Tue Apr 14, 2009 4:07 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Mar 21, 2009 7:12 am
Posts: 66
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


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Tue Apr 14, 2009 4:16 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Nov 24, 2006 6:13 pm
Posts: 342
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

_________________
http://jvitals.com


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Tue Apr 14, 2009 4:18 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10948
Location: Ireland
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

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Mon Apr 20, 2009 5:39 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Apr 19, 2009 2:49 pm
Posts: 5
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


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Mon Apr 20, 2009 8:58 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10948
Location: Ireland
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

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Wed Jul 21, 2010 5:46 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
[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

_________________
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Jul 22, 2010 6:10 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
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. :-[

_________________
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Jul 22, 2010 6:49 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
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


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Jul 22, 2010 7:15 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
Thanks. This answers almost all I asked :D
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!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Jul 22, 2010 7:21 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
there are many sites thats checks speed test... there is also this http://ferenc.biz/yslow-firefox-extension/
firefox addon..

_________________
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Jul 22, 2010 7:51 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
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.

_________________
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Wed Jul 28, 2010 7:47 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Sat Oct 10, 2009 2:28 pm
Posts: 413
Location: Medellin, Colombia
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>

_________________
Retired IBM 360/370 Assembler TPF Systems Programmer


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Wed Jul 28, 2010 8:10 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
??? 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!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Jul 30, 2010 1:49 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Sat Oct 10, 2009 2:28 pm
Posts: 413
Location: Medellin, Colombia
nailson_imgn wrote:
??? What file do I add that to? How can I check for mod_deflate functionality?


this will be of help: http://www.howtoforge.com/apache2_mod_deflate

_________________
Retired IBM 360/370 Assembler TPF Systems Programmer


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Jul 30, 2010 2:39 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
Thanks for the useful link.

_________________
.
Nailson Oliveira
Técnico de Tecnologia da Informação - Desenvolvedor Joomla!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Jul 30, 2010 3:14 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Sat Oct 10, 2009 2:28 pm
Posts: 413
Location: Medellin, Colombia
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:

Code:
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


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...

_________________
Retired IBM 360/370 Assembler TPF Systems Programmer


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Tue Oct 05, 2010 7:33 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
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 ?

_________________
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Oct 15, 2010 10:39 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
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 ?

_________________
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Mon Nov 08, 2010 11:52 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Mar 17, 2010 7:46 am
Posts: 126
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?

_________________
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Wed Nov 10, 2010 10:04 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 21, 2010 2:39 pm
Posts: 152
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)


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Thu Nov 11, 2010 8:59 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 31, 2010 11:59 am
Posts: 36
Hello,

I enabled mod_deflate and I put the following syntax:
Code:
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


- I checked the status on http://www.whatsmyip.org/http_compression/ and it looks fine, however when I run YSlow test it says:

Quote:


Any ideas?


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Sun Nov 14, 2010 8:22 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jun 22, 2009 8:05 pm
Posts: 111
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?


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Jan 07, 2011 12:06 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 24, 2010 2:13 pm
Posts: 10
Location: Bordeaux
Hi all,

really interresting discuss, thanx for all links and explainations ;)

_________________
adishatz, erix
http://www.agerix.fr


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Jan 07, 2011 4:44 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Wed Aug 17, 2005 11:46 pm
Posts: 1022
Location: Minneapolis, MN
garek007 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?


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 time :)

_________________
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


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Mon Nov 28, 2011 3:31 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Nov 16, 2010 1:45 pm
Posts: 118
Location: hyderabad
If i enable Gzip , will this effect on my server CPU usage? i am using shared hosting,

_________________
Regards


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Mon Nov 28, 2011 5:39 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Wed Apr 15, 2009 5:33 pm
Posts: 725
Location: Fortaleza, CE - Brasil
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!
-----------------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Dec 16, 2011 10:05 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 13, 2011 2:58 am
Posts: 10
Location: Turkiye
I didnt see any advantages of gzip for my website.Benchmark values are same before and after.

_________________
http://www.natura-pol.com


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Fri Dec 16, 2011 3:45 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 11, 2008 3:05 pm
Posts: 461
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.


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Sat Dec 17, 2011 10:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 13, 2011 2:58 am
Posts: 10
Location: Turkiye
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.


It is a very important detail.Thank you for your warning.

_________________
http://www.natura-pol.com


Top
 Profile  
 
 Post subject: Re: How to Gzip Joomla ?
PostPosted: Wed Jan 04, 2012 1:33 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 11, 2008 3:05 pm
Posts: 461
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group