1.对于jsp页面,需要在首页jsp页面添加如下:
<%
response.setHeader(“Pragma”,“no-cache”);
response.setHeader(“Cache-Control”,“no-cache”);
response.setDateHeader(“Expires”, 0);
response.setHeader(“Cache-Control”, “no-store”);
%>
这样,退出登录在按返回时,就会正常的被拦截器拦截!
2.对于html页面,需要在登录页面login.html下加上
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" />