Good Idea To Use ob_gzhandler?
Moderator: General Moderators
- volomike
- Forum Regular
- Posts: 633
- Joined: Wed Jan 16, 2008 9:04 am
- Location: Myrtle Beach, South Carolina, USA
Good Idea To Use ob_gzhandler?
Is it a good idea to always use ob_gzhandler? Or, should I detect somehow if the end user's browser supports it, and then turn it on if it does? Or, does Apache handle this swapping for me? I'm still trying to understand this.
- volomike
- Forum Regular
- Posts: 633
- Joined: Wed Jan 16, 2008 9:04 am
- Location: Myrtle Beach, South Carolina, USA
Re: Good Idea To Use ob_gzhandler?
Or, should I just do this in the .htaccess file instead?
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
Re: Good Idea To Use ob_gzhandler?
The ob_gzhandler callback is supposed to detect whether the browser supports gzip encoding (and the type of gzip) and send output accordingly. I say "supposed to", since it relies on the browser to correctly inform it of its capabilities. This generally works fine, however some older versions of IE6 sometime have problems with this.
- volomike
- Forum Regular
- Posts: 633
- Joined: Wed Jan 16, 2008 9:04 am
- Location: Myrtle Beach, South Carolina, USA
Re: Good Idea To Use ob_gzhandler?
Found an answer that seems good:
http://nadeausoftware.com/node/33
According to the mod_gzip documentation, very old web browsers prior to Internet Explorer 4, Netscape 6, and Opera 5 do not properly support compressed files. Fortunately, according to monthly browser statistics reported by W3schools.com, these old browsers dropped below 1% market share way back in 2003. While you can configure the compression modules to handle these browsers specially, it hardly seems worth the effort. Internet Explorer 5.5 and 6 had a rare problem with compressed JavaScript files. A patch was distibuted as a service pack back in 2002. It is unlikely that unpatched IE 6 browsers remain a significant part of the user base any more.
It sounds like I should disable the INI setting with php_value setting in my .htaccess file, and then to turn it on in the .htaccess file. And then of course one has to install mod_deflate. But, it's on my web hosting provider and my workstation, so I'm okay.
http://nadeausoftware.com/node/33
According to the mod_gzip documentation, very old web browsers prior to Internet Explorer 4, Netscape 6, and Opera 5 do not properly support compressed files. Fortunately, according to monthly browser statistics reported by W3schools.com, these old browsers dropped below 1% market share way back in 2003. While you can configure the compression modules to handle these browsers specially, it hardly seems worth the effort. Internet Explorer 5.5 and 6 had a rare problem with compressed JavaScript files. A patch was distibuted as a service pack back in 2002. It is unlikely that unpatched IE 6 browsers remain a significant part of the user base any more.
It sounds like I should disable the INI setting with php_value setting in my .htaccess file, and then to turn it on in the .htaccess file. And then of course one has to install mod_deflate. But, it's on my web hosting provider and my workstation, so I'm okay.