C#清除页面缓存

xiaoxiao2026-06-18  21

private void SetPageNoCache() { Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "No-Cache"); } (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方法 <meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0"> (3) 重新调用原页面的时候在给页面传一个参数: href="****.ASPX?random()"   相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5050359.html

最新回复(0)