Re: [SMARTY] CVS version

From: Date: Fri, 07 Jun 2002 16:20:35 +0000
Subject: Re: [SMARTY] CVS version
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4691@lists.php.net to get a copy of this message
You are right Monte. At the first sight it looks pretty cool to let Smarty handle all this extra stuff, but what If someone uses Smarty with a different purpose? I for once use smarty also to compose mails I send to members of our community. I would not like it to send headers, or compress it. What if you use Smarty for a different protocol. But on the other hand. Smarty has also caching build in. is that also a task of a template engine? I think not (but nice that you have it, i'm not complaining or anything :) I'm using compression right now, that works great and saves an awefull lot of traffic. But it makes caching also very difficult. I thougt about a template engine like smarty that could handle gzip compression. So the cached templates will be put together in compressed form. (you can keep adding parts to a compressed file as long as you calculate the correct CRC at the end) I'm not sure what this does to processor load, and the size of the compressed file. It was just a thought, maybe it inspires someone ? ________________________________________ Martijn van Zal GFXartist Network Technical Manager mail: martijn@gfxartist.com icq: 8213621 > I thought about adding compression support and all kinds of neat things, > but quickly decided that this is a template engine, not a web server :-) > So collect your template output and add all the headers you want. > > As far as Content-Length headers go, this would require output > buffering, which Smarty does not do unless absolutely necessary. And > even then, if you are using fetch() to get your page, you wouldn't know > if the application is sending that directly to the browser or not, so > the correct content-length may not be known. > > Alain Fontaine wrote: > > Hello Monte, > > > > Yes, that is true... however, if you don't use mod_gzip? :). But I agree on > > the question: is it the script's responsibility, or the web server's... > > > > However, there are a couple of other cache-related headers listed at > > > > > > http://www.web-caching.com/mnot_tutorial/how.html#CACHE-CONTROL > > > > These could (should?) be included in Smarty without too much trouble in > > order to be even more "cache-friendly". > > > > -----Message d'origine----- > > De : Monte Ohrt [mailto:monte@ispi.net] > > Envoye : vendredi 7 juin 2002 17:47 > > A : Alain Fontaine > > Cc : smarty-general@lists.php.net > > Objet : Re: [SMARTY] CVS version > > > > > > I thought about that before, but concluded that it shouldn't be Smarty's > > responsibility. Handle that at your application level, or even better at > > the web server level. For instance, mod_gzip sends that header anyways, > > especially since it changes the size of the content. > > > > Thoughts? > > > > > > Alain Fontaine wrote: > > > >>Hi again, > >> > >>Read on www.web-caching.com: > >> > >>"Generate Content-Length response headers. It's easy to do, and it will > >>allow the response of your script to be used in a persistent connection. > >>This allows a client (whether a proxy or a browser) to request multiple > >>objects on one TCP/IP connection, instead of setting up a connection for > >>every request. It makes your site seem much faster." > >> > >>Wouldn't it be nice if Smarty could also send this header? > >> > >>-----Message d'origine----- > >>De : Monte Ohrt [mailto:monte@ispi.net] > >>Envoye : vendredi 7 juin 2002 17:33 > >>A : Alain Fontaine > >>Cc : smarty-general@lists.php.net > >>Objet : Re: [SMARTY] CVS version > >> > >> > >>On the first hit the cache must have been generated. The second hit used > >>the cache and sent the Last-Modified header. > >> > >>Alain Fontaine wrote: > >> > >> > >>>Hello, > >>> > >>>Here is the output of a couple of consecutive CURL calls: > >>> > >>><-- snip --> > >> > >>... > >> > > > > > > > > > > -- > > Monte Ohrt <monte@ispi.net> > > Director of Technology, ispi Inc. > > > > > > -- > Monte Ohrt <monte@ispi.net> > Director of Technology, ispi Inc. > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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