禁止用户后退好象不可能吧,但是可以让后退的时候把页面刷新是可以做到的。下面的代码就可以实现!!!!
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>

解决方案 »

  1.   

    No way to forbidden the history back buttonBut u can make the page time out while the user press back button.Make every link using post methodE.g:current url http://abc.com
    next url http://abc.com.a
    next url http://abc.com.b<form method="post" action="http://abc.com.a" name="myform">
    </form><script>
     gotolink(){ document.myform.submit();}
    </script><a href="javascript:gotolink()">click to go</a>In every servlet,u can use doPost method instead of the doGet method.It may work,but I never try.
      

  2.   

    dmhorse(dmhorse) ( ) 有道理!