PHP笔记网

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2012-09-20 17:57:39  修改时间:2024-12-10 21:52:32  分类:05.前端/Vue/Node.js  编辑

在页面中写入:

两种写法:

1,

<META   HTTP-EQUIV="nocache"   CONTENT="no-cache">

2,

<HEAD>
<META   HTTP-EQUIV="Pragma"   CONTENT="no-cache">
<META   HTTP-EQUIV="Cache-Control"   CONTENT="no-cache">
<META   HTTP-EQUIV="Expires"   CONTENT="0">
</HEAD>

JSP中去掉绶存:

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