网页后退过期的实现
程序员文章站
2022-07-15 14:52:32
...
加入以下代码即可:
<META http-equiv="Expires" content="0"/> <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"/> <META http-equiv="Pragma" content="no-cache"/> <% response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-store, no-cache, must-revalidate"); response.setDateHeader("Expires", 0); %>