Re: [SMARTY] Last-Modified header and fetch()

From: Date: Fri, 14 Feb 2003 14:52:21 +0000
Subject: Re: [SMARTY] Last-Modified header and fetch()
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7762@lists.php.net to get a copy of this message
Gooo catch. A patch is committed to CVS, see if that did the trick. On Fri, 2003-02-14 at 06:22, Ubaldo Huerta wrote: > I wonder why fetch() only sends 'Last-Modified' HTTP header once a template > is compiled and cached, and not upon first compilation/caching of the > template. As far as I can see, there should be no problem sending > 'Last-Modified' = now() upon first compilation. I'll elaborate: (FYI: you > need $cache_modified_check=true for any of this to work) > > I'm observing(*) that in order to reap the benefits of 'If-Modified-Since' > logic, the client needs to hit the same resource 3 times > > 1- Client request test.php. > Smarty compile/cache 'test.tpl' template ('Last-Modified' header NOT > sent) > > 2- Client request test.php > If smarty cache still good, fetch() sends 'Last-Modified' with timestamp > on step 1) > > 3- Client request test.php > If smarty cache still good, fetch() sends 304 Not Modified and no > content (bravo!) NOTE: for this magic to happen client needs to send > 'If-Modified-Since' with timestamp previously sent in 'Last-Modified' > header > (step 2) > > My question is why can't fetch send 'Last-Modified' in step 1? That way, on > step 2, smart clients (proxy-caches all over the place, et al) could get a > sweet 304 without content > > NOTE(*): I found this out using a cacheability test ( > http://www.ircache.net/cgi-bin/cacheability.py) > > ubaldo > > LoQUo Barcelona Community > www.loquo.com -- Monte Ohrt <monte@ispi.net>

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