Re: [SMARTY] CVS version

From: Date: Fri, 07 Jun 2002 16:02:28 +0000
Subject: Re: [SMARTY] CVS version
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4690@lists.php.net to get a copy of this message
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.

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