|
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | topic widgets |
| | #1 |
| Supporter Join Date: Nov 2005 Posts: 180 | I am not a programmer however I do have some tricks I can show to people that may not know how to speed up your directory. The answer is to use GZIP or compression technology like the big guys yahoo, msn, and google. how? You can easily shave off almost half of your bandwidth and download time for your directory using GZIPPING.... most hosts use it if they use PHP.... how to apply this "mod" (its the easiest of em all!):open index.php before ANY code add this: <?php ob_start( 'ob_gzhandler' ); ?> You are done!! To get a feel for how much speed you gained and bandwidth check: http://www.websiteoptimization.com/services/analyze/ Compare before and after.... I gzipped my css file to 1/3 its original size using two things: 1) http://www.cssdrive.com/index.php/main/csscompressor/ and 2) then changing the css file type from .css to .php and adding <?php ob_start ("ob_gzhandler"); header("Content-type: text/css; charset: UTF-8"); header("Cache-Control: must-revalidate"); $offset = 60 * 60 ; $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; header($ExpStr); ?> to the top of the php file Make sure you refer to the php (css) file in the following way: <style type="text/css"> @import url("http://www.yoursite.com/pathto/cssfilename.php"); </style> im done my first contribution...if you call it that :PKNOWN PROBLEMS: may influence MSN rankings? (not sure 100%) - please post here if you know anything about Gzipping and MSN SERPS Last edited by gustotelmy; 07-10-2006 at 06:36 AM. |
| |
| | #2 |
| Join Date: Jan 2006 Posts: 6 | Wow, what huge site speed increase! Thanks! |
| |
| | #3 |
| Join Date: Oct 2005 Posts: 28 | You're my hero! I'm on dialup and my directory just literally loaded in 2 seconds! |
| |
| | #4 |
| Supporter Join Date: Dec 2005 Posts: 20 | nice work dude ![]() its better by 60% __________________ Please double check your sig link |
| |
| | #5 |
| Supporter Join Date: Nov 2005 Posts: 180 | you are welcome ! I am trying to give back to this great community...it works in other php documents too such as your main pages also... all the best |
| |
| | #6 |
| Administrator phpLD Administrator Supporter Join Date: Jan 2005 Posts: 12,325 | Interesting...I will have to test this for 3.0. I'm starting to get the dev area setup, and soon we'll start combing the forums for miscellaneous bug fixes and improvements. __________________ Helpful Links: templates supporters forum █ New phpLD User? Start here █ Quality Guidelines for Directories █ Recommended Host |
| |
| | #7 |
| Join Date: Jun 2005 Location: The world Posts: 813 | David, I was thinking the same thing. ![]() later __________________ Casey Wilson / Ap0s7le Freelance Programmer Need help with PHPLD? PM me |
| |
| | #8 |
| Join Date: Jan 2006 Posts: 8 | You can do it from php.ini for every PHP script easily, just edit your php.ini and find zlib.output_compression and set it to On like: zlib.output_compression = On Don't touch anything else, and restart your Apache. Cheers |
| |
| | #9 |
| Supporter Join Date: Nov 2005 Posts: 180 | glad everyone likes it! the cool thing is it works for people that have browsers enabled for compression ie 99% of them, the rest the server just serves up the un-compressed copy so need to worry about losing visitors... |
| |
| | #10 |
| Join Date: Mar 2006 Location: Ireland Posts: 93 | Excellent, Thank you. |
| |
| | #11 |
| Join Date: Feb 2006 Posts: 534 | works for me, thank you |
| |
| | #12 |
| Join Date: Feb 2006 Posts: 101 | great post i didn't use it for phpLD but another php script the result was great thank you |
| |
| | #13 |
| Join Date: May 2006 Posts: 69 | Very good! According to http://www.websiteoptimization.com/services/analyze/ my home page went from 19 seconds to 12 seconds for the slowest (14.4) connection speed after making this change. |
| |
| | #14 |
| Supporter Join Date: Nov 2005 Posts: 180 | love to see people using it! |
| |
| | #15 |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,524 | It can be done also from your .htaccess file: Code: Content visible to registered users only. Boby __________________ Please do *not* contact me for support on phpLD!! I can hardly find time to give support for my own mods, for anything else I won't.
|
| |
| | #16 |
| Join Date: Feb 2006 Posts: 534 | when this was enabled on 3.0.5 i had description errors from search results :( |
| |
| | #17 |
| Join Date: Feb 2006 Posts: 534 | ya, i get a lot of traffic from msn, so I had to disable this :( |
| |
| | #18 |
| Join Date: Jul 2006 Posts: 13 | I noticed a HUGE difference in my Directory. Thanks for the post. __________________ I also enjoy photography. |
| |
| | #19 |
| Supporter Join Date: Nov 2005 Posts: 180 | Code: Content visible to registered users only. hmm are u serious? **censored****censored****censored****censored**. Msn better wake up this is important to speed up the net. I never thought of SEO implications although I consider myself a pretty good SEOer... sorry for this :( |
| |
| | #20 |
| Supporter Join Date: Nov 2005 Posts: 180 | Code: Content visible to registered users only. cool! that is easier |
| |