GZip Using PHP?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-01-2007, 09:07 PM
vfaith's Avatar
New Pligger
 
Join Date: Dec 2006
Posts: 22
I have gzipped my site http://vfaith.com with the following line added above everything in the index.php file:

<? ob_start("ob_gzhandler"); ?>

The results are:

Original Size: 59 K
Gzipped Size: 9 K
Data Savings: 84.75%

Has anyone else done this? I have implemented the code on my other sites with fantastic results; however, since I am new to the Pligg templating system, I am unsure of what other files are primary in the system. If anyone has any thoughts, please let me know.

Read more about gzip with php before you add the above code HERE
Reply With Quote
  #2 (permalink)  
Old 01-01-2007, 10:18 PM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
Thanks for the tip. I added it to the top of my config.php file and will continue to test it.
Reply With Quote
  #3 (permalink)  
Old 01-02-2007, 12:02 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
Sounds interesting. Thanks for the thread.
Reply With Quote
  #4 (permalink)  
Old 01-02-2007, 12:09 AM
New Pligger
 
Join Date: Dec 2006
Posts: 28
interesting. i went to the test page. adding the extra ob_start("ob_gzhandler"); shows over 80% saving, yet the load time did not change at all?
Reply With Quote
  #5 (permalink)  
Old 01-02-2007, 02:21 AM
Constant Pligger
 
Join Date: Nov 2006
Posts: 123
Send a message via MSN to disier
same here is still load in 5.8 seconds
Reply With Quote
  #6 (permalink)  
Old 01-02-2007, 03:22 AM
vfaith's Avatar
New Pligger
 
Join Date: Dec 2006
Posts: 22
My server is linux based running apache. Could that make any difference? I am not sure what all files in the Pligg template system need the code added to it. I will be testing it out over the next couple of days and let you know what I discover.

RainelleToday.com saw an tremendous increase in the loading speed when I added it to the template there.
Reply With Quote
  #7 (permalink)  
Old 01-03-2007, 01:40 PM
vfaith's Avatar
New Pligger
 
Join Date: Dec 2006
Posts: 22
I went through the root and added the gzip code to all the php files which improved the load speed of the site (seen best improvement on dial up connection) however, the sidebar still loads slower than anything else.

Does anyone have any ideas on the sidebar? I am using the default template.
Reply With Quote
  #8 (permalink)  
Old 01-07-2007, 11:12 AM
New Pligger
 
Join Date: Jan 2007
Posts: 13
Send a message via Skype™ to SeanW
Have a look at http://httpd.apache.org/docs/2.2/mod/mod_deflate.html you can do it at the httpd level and not touch any PHP code.
http://prefetch.net/code/deflate-stats.html is a good script to figure out how much bandwidth you're really saving. Apparently awstats can do it, too.


Sean
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Errors tcritic Questions and Comments 4 09-01-2009 09:40 AM
Gzip Technique That Boosted my load times Adaman Questions and Comments 21 02-28-2008 06:31 AM
cann't vote in pligg (buliding 802) haxhax Questions and Comments 27 03-10-2007 06:53 AM
dreamhost and validation image problem Xanatos Questions and Comments 17 01-17-2007 01:14 PM
/var/log/httpd/error_log messages gr8rcake Questions and Comments 3 01-28-2006 09:28 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development