js设置IE检查所存网页的较新版本之‘每次访问此页时检查’
2012-12-03 16:19
281 查看
方法一
去除该网页在客户端的缓存,迫使浏览器每次读到的都是新的。
不缓存
—验证通过
C#中禁止cache的方法!
Response.Buffer=true;
Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl="no-cache";
—未验证
HTM网页
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
ASP网页
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
转载其他
去除该网页在客户端的缓存,迫使浏览器每次读到的都是新的。
不缓存
—验证通过
C#中禁止cache的方法!
Response.Buffer=true;
Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl="no-cache";
—未验证
HTM网页
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
ASP网页
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
转载其他
相关文章推荐
- 设置IE每次访问页面是检查所存网页的较新版本
- 设置firefox每次访问网页时检查所存网页的较新版本
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法(转)
- 【转载】 IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- 集锦——浏览器每次访问自动更新网页,不用手工设置,附Google/firefox/Ie
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法(转)
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- 设置firefox每次访问网页时检查所存网页的较新版本
- “检查所存网页的较新版本”功能项的设置
- C#设置IE代理和使用代理访问网页
- 【JS】jQuery设置定时器,访问服务器(PHP示例)配合微信、支付宝原生支付,跳转web网页
- js去掉网页设置的默认兼容性(ie)
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- firefox设置每次访问时检查缓存
- "检查所存网页的较新版本"功能项的设置
- FireFox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- 【转】“检查所存网页的较新版本”功能项的设置
- 设置IE7/IE8每次访问网页时都重新加载,而不使用缓存