退出登录后点击浏览器后退按钮仍然可以显示系统内容

在index页面加入以下js即可:

<script>
   history.go(1);
</script>


例如:
<html>
<head>
<title>系统首页</title>
<script language='javascript'>
history.go(1);
</script>
<meta http-equiv=Content-Type content=text/html;charset=gb2312>
</head>
<s:if test="#session.user == null">
      <c:redirect url="error.jsp"></c:redirect>
  </s:if>
<frameset rows="64,*"  frameborder="NO" border="0" framespacing="0">
    <frame src="top.jsp" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
  <frameset cols="200,*"  rows="560,*" id="frame">
    <frame src="left.jsp" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />
    <frame src="right.jsp" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />
  </frameset>
</frameset>
<noframes>
  <body></body>
    </noframes>



原文地址:https://www.cnblogs.com/zhouj850/p/14306261.html