Re: gizp function
| From: | Tom Hensel | Date: | Fri, 25 May 2001 13:37:52 +0000 |
| Subject: | Re: gizp function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-812@lists.php.net to get a copy of this message | ||
hi,
> Yeah, and it's even easier to let apache do the work (where it
> rightfully should!), so your static content gets compressed, and any
> other dynamic content outside of php you might have. mod_gzip also takes
> care of the content-length headers for you, so browser keep-alives will
> work correctly with compressed content.
using PHP's output buffering makes it possible to set headers (and cookies)
virtually after the content has been put out.
the coder doesnt have to care when he sets a cookie -
in many case this allows the structure of the code to be more simple.
PHP 4.0.5 takes care of the 'Content-Lenght' and 'Vary' headers, also.
but anyway, mod_gzip is the most transparent choice if you are in control
of the server. if i had the choice, i'd use PHP's output buffering to
set headers and mod_gzip to compress the output.
bye,
TOM