Session jsp中的会话清除

Session jsp中的会话清除,session,jsp-tags,Session,Jsp Tags,我使用jsp开发了一个web应用程序,当用户尝试注销时,会话不会被清除,即使我使用了session.invalidate()和session.removeAttribute(“用户名”);删除属性(“类型”)当我按下浏览器的后退按钮时,它会重定向到用户的上一页 我的注销代码是 <% session.removeAttribute("username"); session.removeAttribute("type"); session.removeAttribute("Data

我使用jsp开发了一个web应用程序,当用户尝试注销时,会话不会被清除,即使我使用了
session.invalidate()
session.removeAttribute(“用户名”);删除属性(“类型”)当我按下浏览器的后退按钮时,它会重定向到用户的上一页

我的注销代码是

<%
  session.removeAttribute("username");
  session.removeAttribute("type");
  session.removeAttribute("Data");
  session.invalidate();
  response.sendRedirect("Login.jsp"); 
%>

提前谢谢