session注销后,浏览器按后退键不能打开原页面的代码
说明
session注销后,浏览器按后退键之后,不能够打开只有登录后才能看到的页面,后退以后看到的页面是“网页已过期”的提示页面。
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
$(document).ready(function(){
 $("#test").click(
 function (e){
     var ev = window.event;//获取event对象
  location.replace(this.href);
  ev.returnValue=false;
 });
});