How to test content encoding?
| From: | Plutarck | Date: | Mon, 21 May 2001 06:14:00 +0000 |
| Subject: | How to test content encoding? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53676@lists.php.net to get a copy of this message | ||
I'm trying to test the gz_handler, among other things, but I have no idea if
the output is actually gzip encoded.
I'm using PHP 4.0.5 as an Apache module, and here's an example of a test
script:
<?php ob_start("ob_gzhandler"); ?>
<p>This should be compressed.
[bunch of text here just to ensure it's big enough to be encoded. the file
size is about 5700kb]
<?php ob_end_flush(); ?>
I'm using IE 5.5 to view the page, and PHP shows the
HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"] variable as "gzip, deflate", so
the browser is saying it supports gzip content.
Now the question is, how do I actually know if the browser is getting gzip
content?
Plutarck