cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Elam <mi...@pcextremist.com>
Subject Re: RES: RES: Cache and HTMLGenerator
Date Tue, 30 Mar 2004 14:12:14 GMT
Gustavo Nalle Fernandes wrote:

> Thanks for the code! It is indeed very simple! That?s why I like Cocoon :)
>  Regarding the Last-Modified header, the getLastModified() do work for GET
>request, but the GET request
>also brings the whole document and not just the headers. That?s why I was
>observing the whole document being
>transferred all the time. So what is the best scenario for the
>HTMLGenerator?
>
FYI: Web browsers always send GETs.  The difference being that they also 
send the header

If-Modified-Since: ***some timestamp value ***

with the timestamp value being the value they received on the first 
uncached request.  If the page has not been modified, the server sends 
back a 304 status code instead of a 200 and no content.  If the page has 
been modified since the specified timestamp, it sends back the normal 
200 status with the page content.

The same should work with any timestamp.  I've just only ever ever seen 
it used with values previously sent with the server.  This should solve 
your "two requests" problem.

- Miles Elam


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message