shichen2014 通过本文主要向大家介绍了各类常见语言清除网页缓存方法汇总等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
本文实例汇总了各类常见语言清除网页缓存方法。分享给大家供大家参考。具体实现方法如下:
一般来说,清除缓存我们只需要设置页面为no-cache就可以了,当然像asp,php这种只需要设置Expires操作即可,具体如下。
HTML网页:
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"></div>
或者
ASP网页:
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"</div>
PHP网页:
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");</div>
JSP网页:
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 1);</div>
希望本文所述对大家的web程序设计有所帮助。
</div>