- From: Yves Lafon <ylafon@w3.org>
- Date: Tue, 27 Jan 1998 15:54:20 +0100 (MET)
- To: Paul Pazandak <pazandak@OBJS.com>
- cc: Jigsaw Email List <www-jigsaw@w3.org>
On Mon, 26 Jan 1998, Paul Pazandak wrote: > Is there a simple way within an (outgoing) requestfilter to tell if the request has > beenfilled by a > cached page from the proxy rather than a new page from the server? > Could we simply trust that _every time_we see "304 NOT MODIFIED" that the page was > retrieved from the cache? Do we need to parse the HTTP headers to get this, or is there > an > easier way to locate this message when it occurs? A simple way would be to add a filter, called after all the other filters (ie: the last on the list). This filter will place a mark somewhere telling that all the filters has been called, then when called as an outgoingFilter, it will know that it was taken from the cache. If the reply is 304 from the remote server after revalidation, the reply is caught in the cache filter and doesn't appear after the ingoingFilter method of the cachefilter has been called. So you won't see this reply... Interesting problem, It can be good to add a flag in w3c.jigsaw.http.Reply/Request to says that it comes from the cache instead of the remote server... /\ - Yves Lafon - World Wide Web Consortium - /\ / \ Architecture Domain - Jigsaw / \ \/\ / \ / \ http://www.w3.org/People/Lafon - ylafon@w3.org
Received on Tuesday, 27 January 1998 09:56:22 UTC