I have some problem with browser caching I cleared the cache and also invalidated the session and redirected to the login page if the session has expired, in IE there is no problem if I go back and refresh it is redirecting to the login page, but in mozilla when I click the back button in the browser even its redirecting to the login page but when I refresh the page its showing me the recent page of that particular user loggid in, please suggest me where the problem is!!
i did the following thing in logoff.jsp
Expand|Select|Wrap|Line Numbers
- session.removeAttribute("user");
- if (session.getAttribute("user") == null)
- response.sendRedirect("sessionExpiry.do");
- }
- %>
And also I validated the session
Expand|Select|Wrap|Line Numbers
- if (session.getAttribute("user") == null) {
- response.sendRedirect("logon.do");
- }
Expand|Select|Wrap|Line Numbers
- response.setHeader("Expires", "0");
- response.setHeader("Cache-Control" ,"no-cache, must-revalidate");
- response.setHeader("Pragma", "no-cache");
- response.setHeader("Cache-Control","no-store");