On Thu, 7 Oct 1999, Ian St.Martin wrote:
> I have been unable to find any info on whether or not JSP's support a 'page
> changed' mechanism. I am looking for a simple mechanism to tell the http
> server to just use a previously cached page instead of generating a new one.
> (Some of my pages will require extensive database searches/queries, and I
> would like to be able to avoid them when I no that nothing has changed since
> the last time the page was viewed.)
there's nothing in the JSP spec that would do this, but I could be wrong.
one way to do this would be to install a caching HTTP proxy server (such
as Squid) on port 80, and run your normal web server on a different port
(say, port 81). Have your caching proxy pass all non-cached requests to
port 81.
Then set Expires: headers on all your JSP pages. Set Pragma: no-cache
headers on any JSPs that you never want cached by the proxy (ie. always
dynamic).
This assumes that there's some fixed update interval in your JSPs that you
can count on. if your content changes on an irregular schedule (perhaps
based on user input), then this scheme doesn't really work as well.
cheers,
-- James
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html