Speeding up Loading Time
Views:
Author: Chris

How to do it!




<?

ini_set
('zlib.output_compression_level'5);

#sets the ini file with the compression level of your choice.

#where 5 is you can change the compression level, it can be as high as 9 and as low as 0.

#but be careful not to have to much compression, it can result in screwy page loads



ob_start("ob_gzhandler"); 

#now we will use output buffering to run the compression, make sure you put this at the very, very top of the pages you want compressed

?>





My Final Comments



I use level 7 or 8 in compression, seems to work best for my site, one page used to take 16 seconds on my site to load with cache cleared, and ran the compression with cache cleared and it took about 5 seconds on level 8.

Hope you learned a little and if everybody did this, we could make the internet nice and fast. Many forum systems compress their files, like phpbb and sm forums, if you want to do this with your forums and you find that it isn't running the compression, there should be an option in the forums admin panel.

And one last thing about the levels, 5 should be sufficient for most sites. Higher levels, sometimes, about 1 in a thousand pages will load a little weird, so I recommend that you test out 5 or 6 and use your site regularly if you are really concerned about the weird outcome of some compression levels

Back to the Start...

1 2



Comments
You must be logged in or register an account with us before posting a comment.
Statistics
Member Stats Online Members, read legend below: .
Registered Users: 5 registered AND activated.
Member Level Legend NOTE: If the username is underlined it means they may just have the page open and not actually be surfing the site. Administrator
Home

Membership Login

Shout Box

» GO FULL!
Please login to post a shout. » Turn OFF chat!

Point Leader board

© Copyright 2006 - 2008 Tutnation.com and ChrisTheFeral.com