服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

使用java提供的方法防止ie缓存jsp文件


  1, 使用java提供的方法,在jsp或者servlet中都可以
  <%
  response.setheader("pragma","no-cache");
  response.setheader("cache-control","no-cache");
  response.setdateheader("expires", 0);
  %>
  2, 使用html标记,如下面:
  <head>
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  </head>

扫描关注微信公众号