Re: [SMARTY] cache .xml files

boots <[email protected]> Sun, 1 Jul 2007 02:56:42 -0700 (PDT)
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
--- Sebastian Mendel <[email protected]> wrote:
> [email protected] schrieb:
> > messju mohr wrote:
> >> you must not expose the cache files directly to the client but have to
> >> deliver them via $smarty->fetch() or $smarty->display(). set the
> >> correct content-type with php's header() function to please your
> >> clients.
> > 
> > Right... I got confused by the .html extension of the cached files. How
> > does it work right now - who sends the headers when cached file is sent
> > to the client and why if I send header() before $smarty->display() -
> > they will not get overwritten by the headers sent when
> > $smarty->display() is called.
> > 
> > Sorry if the question is stupid but I can't figure it out...
> 
> Smarty does not send any headers.
> 
> Headers are sent by your Web-Server, PHP or by yourself using header()

I agree except to add a small correction about Smarty not sending headers. A
search of "headers(" in
http://cvs.php.net/viewvc.cgi/smarty/libs/Smarty.class.php?view=markup
demonstrates that when Smarty's caching is being used, Smarty may indeed send
Last-Modified, Status or even HTTP/1.1 headers. AFAIK, that's the whole extent
of Smarty directly meddling with HTTP.


       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php