note 70672 deleted from function.gzcompress by bobby

From: Date: Mon, 23 Oct 2006 20:05:10 +0000
Subject: note 70672 deleted from function.gzcompress by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-119029@lists.php.net to get a copy of this message
Note Submitter: ---- I am not sure why but many people don't know about the x-gzip encoding header so the code below should be rewritten as <?php if( strstr( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) !== false || strstr( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) === false || $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip' ) === false){ // do not compress } else { // can send GZIP compressed data } ?> I don't think that ob_start(); checks for this and if it does not, it Should!

« previous php.notes (#119029) next »