Login页面登陆以后到Index页面,页面上有个退出登陆,里面的代码是清空Session(Session.Clear())然后返回到登陆界面,但是点浏览器的后退按钮,依然可以用刚才的身份进入Index页面,这肯定不是想要的效果,请问怎么解决。
      补充:Index页面加载时写了判断的,如果session为空返回到登陆界面,

解决方案 »

  1.   

        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0" />
      

  2.   

    Session(Session.Clear())  你改成Seesion["xxxx"]=null;吧
      

  3.   

    "Session(Session.Clear())"这样写对吗?我记得是Session.Clear(); 或则Seesion["xxxx"]=null;
    同时禁用Index页面的cache看看行不?
      

  4.   

    Response.CacheControl = "no-cache";
    Response.AddHeader("Pragma", "no-cache");