PHP Compression On Your Website... 90% faster loading - FaunaClassifieds
FaunaClassifieds  
  Tired of those Google and InfoLink ads? Upgrade Your Membership!
  Inside FaunaClassifieds » Photo Gallery  
 

Go Back   FaunaClassifieds > General Interest Forums > General BS forum

Notices

General BS forum I guess anything is fair game in here. Just watch the subject matter doesn't get carried away too much.

Reply
 
Thread Tools Display Modes
Old 08-18-2005, 05:00 PM   #1
Milwaukee Reptiles
HOW TO: Add PHP Compression On Your Website... 90% faster loading

Found out some interesting information this week about making your web site load faster. All you need is PHP enabled on your server (ask your webhost).

It's so easy too... just add the following line as the FIRST line of every php file:
(Left-Arrow)? ob_start("ob_gzhandler"); ?(RightArrow)

Replace the (RightArrow) and (LeftArrow) with >
and <

It enabled gzip compression (which browsers have supported for years). It cut one of my pages from 133K to 6.6K... just fricking rediculous.

See
<table id="table_results" border="0" cellpadding="2" cellspacing="1"> <tbody><tr style="cursor: pointer;" onmouseover="setPointer(this, 4, 'over', '#D5D5D5', '#CCFFCC', '#FFCC99');" onmouseout="setPointer(this, 4, 'out', '#D5D5D5', '#CCFFCC', '#FFCC99');" onmousedown="setPointer(this, 4, 'click', '#D5D5D5', '#CCFFCC', '#FFCC99');"><td onmousedown="setCheckboxColumn('id_rows_to_delete4 ');" bgcolor="#ffcc99" valign="top">http://www.whatsmyip.org/forum/viewtopic.php?t=43</td></tr></tbody> </table>
for more info (sorry about the formatting... it was copy/paste)
 
Old 08-24-2005, 01:28 PM   #2
WebSlave
Interesting tip. However, I tried it out on this site, simply with a few of the most accessed modules, and discovered that it loaded my server nearly 5 times more then what is normal. This message board software already incorporates a compression algorithm, so perhaps there was simply a case of diminishing returns at work.

Usually there is a tradeoff involved in algorithms like this. Compression routines are rather processor intensive so you are trading processor loading for network speed gained from smaller files. You may have to determine what is best for you based on you own situation. A heavy duty processor on a slow network may very well benefit greatly from something like this. But a weak processor may just be brought to its knees if your traffic levels are fairly high.
 
Old 08-24-2005, 01:47 PM   #3
Milwaukee Reptiles
Good point webslave.

I'm got my site hosted externally so I don't get access to CPU performance (Although I hope to have my own server after we move when I get a static IP address). This site also gets a lot moer traffic than mine ever does (I get about 400 hits visits a day... this site gets about 35,000 according to your topsites list). I would think that the double compression could be bad as well, which may be why it's having problems on your server (like running WinZIP in 'Best Compression' mode takes longer than 'Normal')

So I think it would be better on lower-traffic sites (most the reptile breeders), but would be bad for shared hosting or large sites such as this.
 

Join now to reply to this thread or open new ones for your questions & comments! FaunaClassifieds.com is the largest online community about Reptile & Amphibians, Snakes, Lizards and number one classifieds service with thousands of ads to look for. Registration is open to everyone and FREE. Click Here to Register!

 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
New website perefalcon New or Updated Websites and Web Resources 12 03-31-2006 10:45 PM
Website What do ya think? No1snotsucker New or Updated Websites and Web Resources 5 07-14-2005 08:40 AM
Website Hosting for those with their own personal website?? uf_g8or New or Updated Websites and Web Resources 7 12-24-2004 01:26 AM
problem loading oulook express? geckogrl6 General BS forum 1 11-15-2004 09:13 AM
People who are faster/smarter/online more than me SWAG SOUND OFF!!! 2 11-12-2003 04:40 PM


All times are GMT -4. The time now is 08:02 AM.







Fauna Top Sites


Powered by vBulletin® Version
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Page generated in 0.05262208 seconds with 10 queries
Content copyrighted ©2002-2022, FaunaClassifieds, LLC