I have similar situation as above. When user logoff session.invalidate(); response.sendRedirect("login.tml"); but after going to login.html if user clicks browser back button it display's the contnts of the page. How do I prevent it. Any help appreciated. I have a peice of code in a page when user clicks browser back button to know the session and prevent, but still doesn't work. In netscape ir works I guess: Data Missing This document resulted from a POST operation and has expired from the cache. If you wish you can repost the form data to recreate the document by pressing the reload button.
but IE it shows contents of the page. Please any help appreciated. Thanks Jay Rotti
Thanks maha anna but let me re frame my problem. All the cache preventing methods and session invalidation works absolutley fine in Netscape but it doesn't work in IE, do you think anything wrong in my prog? Have a look(this a page which gets displayed even after session is invalid and when user hits browser back button) I am cinfident that it si caching because when I refresh the same page it doesn't dipaly the contents" <%@ page language="java" contentType="text/html" %> <% response.addHeader("Pragma", "No-cache"); response.addHeader("Cache-Control", "no-cache"); response.addDateHeader("Expires", 0); response.setDateHeader("max-age", 0); if (session.getAttribute("fullname") == null) { out.println("Sorry You are not allowed to view the contents of the page"); } else { %> <html> <head> <title>All Tickets</title> <meta http-equiv="refresh" content="text/html; charset=iso-8859-1" > </head> <body> <% out.println(rs.getString("name")); %> </body> </html> Thanks Jay rotti
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.