Gzip via PHP will save tons of bandwidth

Discussion in 'Support & Feedback' started by TomN, May 31, 2006.

  1. #1
    I see the forums on DP use GZIP, but the other pages on DP do not.
    *EDIT*
    Actually I see that the other pages such as /tools/ does use GZIP...
    /support/ isn't gzipped it seems....
    So is the homepage gzipped or what?
    I'm sorry if i'm totally wrong, im just trying to be helpful..

    *EDIT*
    See
    http://www.whatsmyip.org/mod_gzip_test/?url=aHR0cDovL3d3dy5kaWdpdGFscG9pbnQuY29tLw==

    Put

    <? ob_start('ob_gzhandler'); ?>
    PHP:
    at the very top of the page, I'm positive Shawn knows PHP :)

    I just did it for my sites and it's freaking awesome.

    Hope you try this, just add it to the top of your pages, I bet you might have a global header file for your pages.

    If you use output buffering, just put the code before any callback function you may be using since the ob_start functions are loaded from last to first line.

    
    <? ob_start('ob_gzhandler');
    ob_start('mycallback');
    ?>
    
    PHP:
    Should work.
     
    TomN, May 31, 2006 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Anything that's high traffic *or* any PHP page within digitalpoint.com already does gzip.
     
    digitalpoint, May 31, 2006 IP