Re: gizp function
| From: | Monte Ohrt | Date: | Fri, 25 May 2001 13:32:08 +0000 |
| Subject: | Re: gizp function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-811@lists.php.net to get a copy of this message | ||
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.
Tom Hensel wrote:
>
> On 25.05.2001 15:19 Uhr user "Monte Ohrt" wrote as <monte@ispi.net>:
> hi,
>
> > I thought about implementing this at one time but ran into some
> > technical problems when caching with insert tags. It would probably be
> > best to keeping gzip out of Smarty, as some folks will want to use their
> > own gzip class, or already compress everything with mod_gzip. Just use a
> > gzip class along with Smarty, or better yet, use mod_gzip with apache to
> > compress all your content.
>
> PHP itself supports working output-buffering since 4.0.4,
> in 4.0.5 its even more flexible.
>
> ob_start("ob_gzhandler");
> ...
> ob_end_flush();
>
> its easy ;)
>
> bye,
> TOM
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/