ASP.NET清除页面缓存
(1) Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");
(2) HTML方法
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>
(3) 重新调用原页面的时候在给页面传一个参数: href="****.ASPX?random()"
本文介绍三种ASP.NET中清除页面缓存的方法:通过设置Response对象属性、使用HTML元标签及通过URL传递随机参数来避免浏览器缓存页面。

391

被折叠的 条评论
为什么被折叠?



