首页 行业资讯 宠物日常 宠物养护 宠物健康 宠物故事

JS 如何清除页面缓存

发布网友 发布时间:2022-04-21 15:43

我来回答

1个回答

热心网友 时间:2022-04-22 16:18

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()">

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com