Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 09:47:11 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155535
Posts in
21713
Topics by
7737
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
[Solved] Enable Gzip compression?
Pages: [
1
]
Go Down
Author
Topic: [Solved] Enable Gzip compression? (Read 1574 times)
Boudi
Addon Team
Offline
Posts: 816
[Solved] Enable Gzip compression?
«
on:
March 18, 2010, 12:04:15 AM »
Hi there,
Is there any way (how) to enable Gzip compression within wb in order to load pages faster?
Boudi
«
Last Edit: March 18, 2010, 10:19:23 AM by Boudi
»
Logged
...:: Bake the Unbakable ::...
albatros
Offline
Posts: 674
Re: Enable Gzip compression?
«
Reply #1 on:
March 18, 2010, 12:11:09 AM »
Hi,
I reallly don't know if it makes sense, but perhaps this could be a way
http://farhadi.ir/works/smartoptimizer
hth
albatros
Logged
WB-Boosta
Offline
Posts: 72
Re: Enable Gzip compression?
«
Reply #2 on:
March 18, 2010, 01:47:30 AM »
Sounds cool (although on a Drupal-site), any experiences yet?
What about gzip-enabling within .htaccess?
Logged
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #3 on:
March 18, 2010, 10:21:31 AM »
@ Albatros, thnq for your url. Looked at it but was indeed looking for a more htaccess minded thing
@ Boosta:
create htaccess and put the following lines in:
Code:
<FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
</FilesMatch>
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
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
With this code you:
- enable the Gzip compression
- clear browser cache
In my case the page speed speeded up to 93/100 score
Logged
...:: Bake the Unbakable ::...
WB-Boosta
Offline
Posts: 72
Re: [Solved] Enable Gzip compression?
«
Reply #4 on:
March 18, 2010, 06:45:02 PM »
Hhm,
Code:
<FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
</FilesMatch>
shows a 404-site.
Is there any change? I notice nothing. But perhaps the browser caches all pages? YSlow does not notice then?
In any case, I've cleaned up my CSS, switch the jQuery-UI off and save a lot of weight.
«
Last Edit: July 13, 2010, 09:44:53 AM by WB-Boosta
»
Logged
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3719
Re: [Solved] Enable Gzip compression?
«
Reply #5 on:
March 18, 2010, 09:01:05 PM »
works, maybe 4u2. but need e.g. xxx.js AND xxx.js.gz
Code:
# Compress .js and .css files
AddEncoding gzip .gz
<FilesMatch "\.js\.gz$">
AddType "text/javascript" .gz
</FilesMatch>
<FilesMatch "\.css\.gz$">
AddType "text/css" .gz
</FilesMatch>
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME} \.(js|css)$
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
http://www.websitebaker2.org/forum/index.php/topic,17350.0.html
dbs
«
Last Edit: March 18, 2010, 09:35:21 PM by dbs
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #6 on:
July 13, 2010, 01:31:21 AM »
Quote from: WB-Boosta on March 18, 2010, 06:45:02 PM
Hhm,
Code:
<FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
</FilesMatch>
bringt mir eine 404-Seite.
Ob sich durch die anderen Zeilen etwas ändert? Ich merke nix. Aber vielleicht cacht der Browser alles Seiten? YSlow merkt es dann nicht?
Auf jeden Fall habe ich meine CSS aufgeräumt, die jQuery-ui deaktiviert und eine Menge Gewicht eingespart.
Please talk English in this forum. Thanks.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #7 on:
July 13, 2010, 01:34:53 AM »
Tonight I just stumbled upon a little piece of htaccess code that uses the deflate function to dynamically compress files. It makes my pages typically around 70% smaller!! Why I only just now learned about dynamic compression is a mystery to me... I guess a lot of people just don't know about this!
Add this to your .htaccess file:
Code:
<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
</IfModule>
It seems to do about the same as the code mentioned above. So I don't know the difference. This code seems cleaner and easier to understand anyway.
You can check your old and new page size at
http://www.whatsmyip.org/http_compression/
«
Last Edit: July 13, 2010, 01:39:33 AM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #8 on:
July 13, 2010, 08:37:38 AM »
Hi Argos,
Thnx for the code.
I'm always interested in speeding up websites. I tried your code but testing it afterwards with Firefox Firebug there seems no faster loading at all.
Your link gives indeed a fictional new improved result but again, with the firebug I don't see any differences...
Does anyone?
Boudi
Logged
...:: Bake the Unbakable ::...
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #9 on:
July 13, 2010, 10:45:24 AM »
I'm not sure why firebug doesn't show speed increase.
It's not fictional, it's real. You can also check with the W3C validator, it clearly shows big page load improvements.
Or try
http://www.iwebtool.com/speed_test
http://www.websitegoodies.com/tools/speed-test.php
http://tools.pingdom.com
and other speed and page load test sites.
Also check out
http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html
to read about speed becoming more important for Google ranking.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #10 on:
July 13, 2010, 10:55:05 AM »
Quote
Or try
http://www.iwebtool.com/speed_test
http://www.websitegoodies.com/tools/speed-test.php
http://tools.pingdom.com
and other speed and page load test sites.
Tried all of them and they all give me the 'old' size of the website. So in my case it's still fictional
Logged
...:: Bake the Unbakable ::...
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #11 on:
July 13, 2010, 10:56:49 AM »
Then your server doesn't support compression I guess... Check it with a info.php file.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #12 on:
July 13, 2010, 12:11:09 PM »
Web compression is enabled.
This is what I get now with whatsmyip.org:
Original Size: 17.07 KB
Gzipped Size: 3.95 KB
Data Savings: 76.86%
This means that the loading size now is 3.95 kb?
Because when doing a test on websitegoodies.com I get this result:
Load Time: 1.379 seconds
Page Size: 17.07 kb
So what's the real size now?
Logged
...:: Bake the Unbakable ::...
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #13 on:
July 13, 2010, 12:56:53 PM »
Websitegoodies is a speed test that apparently shows the uncompressed page size. Whatsmyip is a page weight test.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #14 on:
July 13, 2010, 01:11:51 PM »
Then is it actually working then? If all speedtestpages shows the uncompressed 17 kb and the FF extension Firebug doesn't give any faster results before/after inserting the htaccess code, then it seems that it isn't actually working?
Is it possible that it's more a theoretical number on whatsmyip.org?
Does it really work on your website(s) then?
Boudi
Logged
...:: Bake the Unbakable ::...
Argos
Moderator
Offline
Posts: 2161
Re: [Solved] Enable Gzip compression?
«
Reply #15 on:
July 13, 2010, 01:22:25 PM »
I don't know Boudi, I see the results on whatsmyip.org, I see big page size decreases, and I really notice speed improvements on some sites, so I guess it's working.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team
Offline
Posts: 816
Re: [Solved] Enable Gzip compression?
«
Reply #16 on:
July 13, 2010, 01:34:48 PM »
I placed it on some heavy sites and you are right. It seems loading even more faster.
Thnq for sharing this piece of code. Speed is good for SEO
Boudi
Logged
...:: Bake the Unbakable ::...
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...