你那句话是客户端的脚本。
服务器端:
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache "
%>
客户端:
用客户端代码使浏览器不再缓存Web页面:
<html>
<head>
<meta http-equiv= "Expires " CONTENT= "0 ">
<meta http-equiv= "Cache-Control " CONTENT= "no-cache ">
<meta http-equiv= "Pragma " CONTENT= "no-cache ">
</head>
如果使用上面的方法强制浏览器不再缓存Web页面,必须注意以下几点:
只有在使用安全连接时“Pragma: no-cache”才防止浏览器缓存页面。对于不受安全保护的页面,“Pragma: no-cache”被视为与“Expires: -1”相同,此时浏览器仍旧缓存页面,但把页面标记为立即过期。
但是在IE 4或5中,“Cache-Control”META HTTP-EQUIV标记将被忽略,不起作用。
服务器端:
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache "
%>
客户端:
用客户端代码使浏览器不再缓存Web页面:
<html>
<head>
<meta http-equiv= "Expires " CONTENT= "0 ">
<meta http-equiv= "Cache-Control " CONTENT= "no-cache ">
<meta http-equiv= "Pragma " CONTENT= "no-cache ">
</head>
如果使用上面的方法强制浏览器不再缓存Web页面,必须注意以下几点:
只有在使用安全连接时“Pragma: no-cache”才防止浏览器缓存页面。对于不受安全保护的页面,“Pragma: no-cache”被视为与“Expires: -1”相同,此时浏览器仍旧缓存页面,但把页面标记为立即过期。
但是在IE 4或5中,“Cache-Control”META HTTP-EQUIV标记将被忽略,不起作用。