note 16768 deleted from function.ob-gzhandler by jimw
| From: | jimw@php.net | Date: | Fri, 21 Dec 2001 00:47:08 +0000 |
| Subject: | note 16768 deleted from function.ob-gzhandler by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23697@lists.php.net to get a copy of this message | ||
You should use this with care. Some browsers claim they support gz-data, but they don't. Some
proxies do the same and pass compressed data to their clients - without telling them!
So here is what I would recommend to use:
$use_gz = true;
if (eregi("NetCache|Hasd_proxy", $HTTP_SERVER_VARS['HTTP_VIA']) ||
eregi("^Mozilla/4\.0[^ ]", $USER_AGENT)){$use_gz = false;}
if ($use_gz) { @ob_start("ob_gzhandler"); }
header("Vary: Accept-Encoding");