JSP 禁止页面缓存,修复浏览器后退造成的权限 BUG

原创
2014/02/25 14:31
阅读数 1K
  1. 这里只需要在 JSP 代码块当中加入

  2. <%  

  3. response.setHeader("Pragma","No-cache");  

  4. response.setHeader("Cache-Control","no-cache");  

  5. response.setHeader("Cache-Control""no-store");  

  6. response.setDateHeader("Expires"0);  

  7. %>  

  8. 在 HTML 头部加入以下 META 信息

  9. <meta http-equiv="Expires" content="0">  

  10. <meta http-equiv="Cache-Control" content="no-cache">  

  11. <meta http-equiv="Cache-Control" content="no-store">  

  12. <meta http-equiv="Pragma" content="no-cache">  


展开阅读全文
加载中

作者的其它热门文章

打赏
1
6 收藏
分享
打赏
0 评论
6 收藏
1
分享
返回顶部
顶部