How to expire page 2003-10-24 - By Bhavdeep Sharma
Back How can I stop browsing caching the JSP pages. Requirement is that if user press the back button on browser then that page should expire.
I tried the following
<jsp:useBean id="loginSession" scope="session" type="com.quark.lc.web.LoginSession" /> <% response.setContentType(loginSession.getPageContentType()); response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", -1); %>
On page it works and on other not.
Thanks Bhavdeep
=========================================================================== To unsubscribe: mailto listserv@(protected) with body: "signoff JSP-INTEREST". For digest: mailto listserv@(protected) with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
|
|