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