现在的位置: 首页 > 综合 > 正文

禁止页面缓存

2013年04月11日 ⁄ 综合 ⁄ 共 336字 ⁄ 字号 评论关闭

1. JSP/Servlet

   <%
       response.setHeader("Pargma", "No-cache");
       response.setHeader("Cache-Control", "no-cache");
       response.setDateHeader("Expires", 0);
   %>

2. HTML

   <head>
       <meta http-equuiv="Pragma" content="no-cache">
       <meta http-equuiv="Cache-Control" content=no-cache">
       <meta http-equuiv="expires" content="0">
  
</head>

抱歉!评论已关闭.