Re: gizp function

From: Date: Fri, 25 May 2001 13:53:08 +0000
Subject: Re: gizp function
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-813@lists.php.net to get a copy of this message
I don't think I'd use output buffering purely for the convenience of setting headers, as there is a processing and memory cost to buffering the content (at least I would think so?). If you can get away with sending the content outright with no buffer, that _should_ be slightly more efficient. Tom Hensel wrote: > > 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 > > --- > 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/

« previous php.smarty.general (#813) next »