rundi 0 Posted May 27, 2006 Share Posted May 27, 2006 Hello all - I was searching the web on how to optimize my website bandwith usage and I came across this post at the Yahoo Search blog. So my question is, can we use this feature on our accounts? I use Wordpress for some blogs and I saw that under the reading options they have a check box that says "compress articles (gzip) if browsers ask for them" I assume this is something like mod_gzip, but obviously this only works for stuff in my wordpress blog. Is there any way we can do something similiar for stuff elsewhere? Rundi Quote Link to post Share on other sites
TCH-Don 0 Posted May 27, 2006 Share Posted May 27, 2006 As I understand it this will work on php files if you put this in your .htaccess file php_value output_handler ob_gzhandler I found this thread on To Compress My Site, by changing code in .htaccess that explains. Quote Link to post Share on other sites
MikeJ 0 Posted May 27, 2006 Share Posted May 27, 2006 php_value output_handler ob_gzhandler Just keep in mind that if you enable this site wide with the above, you do not want to enable it in individual packages like wordpress, because then the content can potentially be gzip'd twice and actually cause you problems. Quote Link to post Share on other sites
rundi 0 Posted May 27, 2006 Author Share Posted May 27, 2006 Just keep in mind that if you enable this site wide with the above, you do not want to enable it in individual packages like wordpress, because then the content can potentially be gzip'd twice and actually cause you problems. Thank you TCH-MikeJ for that important point of clarification! It seems to me, then, that it would be best to do this in the .htaccess for the entire website rather than individually in Wordpress? I can't think of any advantage of doing it from within Wordpress . . . but I'm not really smart on this type of thing. Also, for other people who come to read this thread, I want to point out that the gzip feature both of the above responders are talking about is not mod_gzip. Mod_gzip is an Apache mod. The above code given by TCH-Don is a php function that uses gzip compression. I followed the link TCH-Don provided and eventually got to here where (if you read far enough down the threat) it is said that mod_gzip is not supported on shared servers. Unless that has changed it means those of us who use a shared server can't use mod_gzip, but you can use the php function if you are using php. Correct? Which leads me to the question, could I change the extension of a .html file to .php and have it get gzipped by the php compression? That would be cool. Thanks Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.