On Sun, Oct 13, 2002 at 01:44:15AM +0200, Robert Bihlmeyer wrote:
> Matthew Toseland <[EMAIL PROTECTED]> writes:
>
> > On Mon, Oct 07, 2002 at 01:34:49AM -0700, Ian Clarke wrote:
> > > Forwarded email I received:
> > >
> > > Hey Ian, good work on Freenet. Just a hint for the next version - if
> > > you include a Last-Modified header for the images inside the web
> > > interface, it'll prevent the browser from having to request them every
> > > hit to the page.
> > Set it to current time minus 1 day, we do want them to be reloaded
> > eventually if they do change.
>
> I interpreted "images inside the web interface" as the stuff served
> under /servlet/images/, which shouldn't really change without a node
> restart. The appended patch returns the time the ImageServlet class
> was loaded as the last-modified time.
What about Expires: ? Any other cache affecting fields?
>
> If-Modified-Since should theoretically work now, but my javax
> implementation seems to botch that somewhere...
>
> Regarding last-modified of *keys*, I think we should at least serve
> CHKs with a very old date. If we want to get fancy, DBR'd keys could
> include the last switchover time.
>
>
> Index: ImageServlet.java
> ===================================================================
> RCS file: /cvsroot/freenet/freenet/src/freenet/client/http/ImageServlet.java,v
> retrieving revision 1.1
> diff -u -r1.1 ImageServlet.java
> --- ImageServlet.java 24 Sep 2002 03:42:52 -0000 1.1
> +++ ImageServlet.java 12 Oct 2002 23:37:59 -0000
> @@ -59,6 +59,11 @@
> Node.logger.log(this, "Failed to read/write image", e,
>Node.logger.ERROR);
> }
> }
> -
> +
> + static final private long loadTime = System.currentTimeMillis();
> +
> + protected long getLastModified(HttpServletRequest req) {
> + return loadTime;
> + }
> }
>
>
> --
> Robbe-- Matthew Toseland [EMAIL PROTECTED] [EMAIL PROTECTED] Freenet/Coldstore open source hacker. Employed full time by Freenet Project Inc. from 11/9/02 to 11/11/02.
msg04352/pgp00000.pgp
Description: PGP signature
