JS 如何清除页面缓存

JavaScript012

JS 如何清除页面缓存,第1张

1.动态页面:index.asp?id=....

2.使用jquery,$.ajaxSetup({cache : false })

3.在html里的head标签中加

<meta http-equiv ="proma" content = "no-cache"/>

<meta http-equiv="cache-control" content="no cache" />

<meta http-equiv="expires" content="0" />

另外一种:

<html http-equiv="proma" content="no-cache"/>

<html http-equiv="content-type" content="no-cache , must-revalidate"/>

<http http-equiv="expires" content=" Wed , 26 Feb 1997 08:21:57 GMT"/>

另外 ,在提交信息时,总是出现旧的内容,此时就应该考虑是本地浏览器缓存的原因了。

清空临时缓存的方法:

<body onload ="javascript : document.yourFormName.reset()">

nodejs清理谷歌浏览器缓存方法如下。

1、打开需清缓存的页面,再按F12调出开发模式框。

2、勾选Network标签下Disablecache选项。

3、按F5或右键重新加载刷新页面内容。

4、页面重新加载完成再按F12隐藏开发模式框即可清理谷歌浏览器缓存。