Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 14-03-06
BFG 9000's Avatar
Coffee Drinker
 
Join Date: Jul 2005
Location: South UK
Posts: 243
Thanks: 9
Thanked 9 Times in 8 Posts
BFG 9000 is an unknown quantity at this point
  Make your page sizes smaller with php..

Greetings all,

I've just discovered the delights of :-
PHP Code:
<?php ob_start("ob_gzhandler"); ?>
This is probably old news to the majority on here, but basically, I just added that line to the top (N.B. it MUST be before you echo any output) of a script producing 1000 results & saw the resultant filesize drop from 250k to 28k.
Now I don't care what planet you come from, that's a fairly good result!!

Interesting links :-
http://uk2.php.net/ob_gzhandler
http://www.whatsmyip.org/mod_gzip_test
My Results...


TTFN

BFG
__________________
SELECT * FROM MANAGEMENT WHERE CLUE > 0; NO RESULTS FOUND
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 14-03-06
leaddo's Avatar
Registered User
 
Join Date: Nov 2003
Location: Grimsby
Posts: 250
Thanks: 0
Thanked 0 Times in 0 Posts
leaddo is an unknown quantity at this point
BFG, Fantastic!

I for one didn't know about this. I've just implemented it on my home page. Original size 41k new size 8k.:eek:

Thanks.
__________________
Andy

Make Gift Giving Personal and PersonaliseYaGifts | My New Blog about AffiliateLiving | Cheap Super Fast Broadband
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 14-03-06
BFG 9000's Avatar
Coffee Drinker
 
Join Date: Jul 2005
Location: South UK
Posts: 243
Thanks: 9
Thanked 9 Times in 8 Posts
BFG 9000 is an unknown quantity at this point
I had a bit of a 'jaw on the floor' moment when I saw the results.
Just spotted you're in Grimsby - my home town.
I may be moving back up there shortly.

TTFN

BFG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 14-03-06
leaddo's Avatar
Registered User
 
Join Date: Nov 2003
Location: Grimsby
Posts: 250
Thanks: 0
Thanked 0 Times in 0 Posts
leaddo is an unknown quantity at this point
Why would you want to move back once you had 'escaped'.

I'm not saying it's a bad place, I've been to a lot worse, it's just that it's on the road to nowhere. We're trying to move out at the moment, without much luck though.
__________________
Andy

Make Gift Giving Personal and PersonaliseYaGifts | My New Blog about AffiliateLiving | Cheap Super Fast Broadband
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 15-03-06
Registered User
 
Join Date: Sep 2005
Location: Sydney
Posts: 44
Thanks: 0
Thanked 1 Time in 1 Post
meijboom is an unknown quantity at this point
So this only works on PHP pages? Is there an alternative for 'normal' HTML pages? Some of the html and asp pages on my sites are pretty slow at loading, so if there's anything I can use that would be good.

E
__________________
www.meijboom.co.uk: travel, voetbal, australia & photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 15-03-06
zaq zaq is online now
Registered User
 
Join Date: Aug 2003
Location: Here
Posts: 1,364
Thanks: 0
Thanked 0 Times in 0 Posts
zaq is an unknown quantity at this point
Quote:
Originally Posted by meijboom
So this only works on PHP pages? Is there an alternative for 'normal' HTML pages? Some of the html and asp pages on my sites are pretty slow at loading, so if there's anything I can use that would be good.

E
Hi meijboom,

Its says at the following url: http://www.whatsmyip.org/mod_gzip_test/

---------------------------------------------------
mod_gzip is an Apache web server module that compresses the HTML as it sends it out. It is compatible with all browsers (old browsers that don't support gzip content will get uncompressed HTML). Using gzip can save you HUGE amounts of bandwidth, and increase the overall performance of your webserver. It also makes a world of difference for people viewing your site on a dial-up modem.
---------------------------------------------------

And more details here: http://www.whatsmyip.org/forum/viewtopic.php?t=43
__________________
A survivor personality is a winning personality that longs to win in the long-term, within the big picture and not one that looks only to succeed within individual moments.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 15-03-06
pricethat's Avatar
data muncher
 
Join Date: Sep 2004
Location: Berlin
Posts: 2,485
Thanks: 0
Thanked 0 Times in 0 Posts
pricethat is an unknown quantity at this point
We use this as default for everything we do but i just looked and it is not there on our site :eek: Will kick someones ass. Just a little comment though, if you have hammered servers anyway you may be exchanging lower bandwith for more work on the processor. Its minute of course but the main people it really really benefits (seriously high usage) just simply exchange one cost for another if you see what i mean.
__________________
Nothing to see here...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #8 (permalink)  
Old 15-03-06
DanielCoe's Avatar
Home is where I hang my @
 
Join Date: Sep 2003
Location: My Bedroom
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
DanielCoe is an unknown quantity at this point
Are there any disadvantages at all to using this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 15-03-06
Super Moderator
 
Join Date: Aug 2003
Posts: 2,451
Thanks: 0
Thanked 0 Times in 0 Posts
Rich is an unknown quantity at this point
First off, that Whatsmyip test doesn't seem to always work. Its showing some of my sites as not gzipped when they should be and using this checker and the firefox webdeveloper bar show that it is serving gzipped content correctly.

Personally I think mod_gzip is a better solution than output buffering in PHP as it should run faster and can also compress static html pages if you wish.

For downsides, it can slow down your site, particually if you're files are quite small already and/or users you fast connections. As it takes time after the page has been generated to compress it at the server and to decompress it at the client, it is possible for it to be faster to send it uncompressed.

E.g. Googles home page is 4Kb uncompressed, 1kb compressed, so on a 2Mb/s link, if the commpression and uncompression takes longer than a 100th of a second it will faster to send the uncompressed version. Obviously, in this case both versions will load quickly so Google are probably doing it to save bandwidth.

Also the CPU load to compress data can be quite a hit which can further slow down a site which is why quite a few hsared host won't run mod_gzip - I don't know if they also restrict the php functions that do a similar job.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 27-03-06
Registered User
 
Join Date: Sep 2005
Location: Sydney
Posts: 44
Thanks: 0
Thanked 1 Time in 1 Post
meijboom is an unknown quantity at this point
I tried to get this working, but haven't had any luck. Please could someone assist. Is there anywhere in particular that I should place this cose in my html (ie between the <head> tags?)?

Many thanks,

E
__________________
www.meijboom.co.uk: travel, voetbal, australia & photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #11 (permalink)  
Old 27-03-06
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
before everything, before the <html> tag at the very start of a page.
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote