cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gustavo Nalle Fernandes" <...@ig.com.br>
Subject RES: RES: RES: Cache and HTMLGenerator
Date Tue, 30 Mar 2004 14:43:02 GMT
  Well, this solves que question of tranferring big documents only to know
the last modified date, and always making a GET request, which is nice.
  But if I understand correctly, the remote server must have the
last-modifed header in order to this whole scheme work.

  Gustavo

-----Mensagem original-----
De: Miles Elam [mailto:miles@pcextremist.com]
Enviada em: terça-feira, 30 de março de 2004 11:12
Para: users@cocoon.apache.org
Assunto: Re: RES: RES: Cache and HTMLGenerator


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



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


Mime
View raw message