FaunaClassifieds - View Single Post - PHP Compression On Your Website... 90% faster loading
View Single Post
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)