Hi,

I wrestled with caching before.  I've tried everything that everyone else is
suggesting (and then some).  I found that I could control the caching only
by changing the webserver configuration.

If you're using IIS, try the following:

1.  Fire up Internet Service Manager.
2.  Find your web application (Default Web Site will do) and bring up the
Properties.
3.  Click on the "HTTP Headers" tab.
4.  Check "Enable Content Expiration" and select "Expire Immediately".

Make sure you use this carefully, as it will force a reload of every page
within the directory.  You may not want this for non-dynamic content.

If you're using Apache, there are some config directives that accomplish the
same thing, though I don't remember them off the top of my head.

Good luck!
Matthew Lehrian


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Lisa Lewis
Sent: Tuesday, June 06, 2000 10:44 AM
To: [EMAIL PROTECTED]
Subject: IE5 caching of JSP pages, ( using JRUN )


I am having trouble preventing IE from caching my JSP pages.  I have
wasted an entire day on this.  I have read and tried every relevant post.
Below is a snippet of my code from one of my JSP pages that I would like the
browser NOT to cache!  I am adding the meta tags in both HTML and the JSP
response headers.  I tried various combinations of this.  I have also tried
to check the 'Set no-cache header on responses' checkbox in the JRUN
administration tool.  This doesn't seem to work either.  I have also tried
adding <meta http-equiv="Expires" content="0"> to the bottom of the JSP
page.
Someone had posted this suggestion as a way to get around a bug in IE5.  I
have not had any luck getting any of these solutions to work.

Note: When I set the response headers, the page doesn't show up in the
history
but it still caches the page because the next time I hit a button to bring
up
the new page, it retrieves the old one.  I am using Javascript:
parent.location=
"/servlet/GuiControllerServlet?actiontotake=displaypatientlistsplitframeset"
;
...when the button is clicked.

Any advice/suggestions will be greatly appreciated!

Thanks,
Lisa

code snippet:

<%
  // Try to prevent browsers from caching page!!
  response.setHeader("Pragma","no-cache"); // HTTP 1.0
  response.setDateHeader("Expires",0); //prevents caching at proxy server
  response.setHeader("Cache-Control", "no-cache");
  //response.setHeader("Cache-Control", "no-store"); // HTTP 1.1
%>

<html>
<head>

<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">

</head>

Thanks,
Lisa

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to