禁止浏览器缓存页面,对html页面和jsp最好都加一些设置对于HTM网页,加入:
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> 然后,jsp页面中加入:
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0);
%>
html jsp 禁止浏览器缓存页面
本文介绍了如何通过在HTML和JSP页面中添加特定的元标签和HTTP头来防止浏览器缓存这些页面。对于HTML页面,使用<meta>标签设置pragma、cache-control和expires属性;对于JSP页面,则通过设置response头部实现。


被折叠的 条评论
为什么被折叠?



