Cache of empty browser client in ASP.NET

zhaozj2021-02-16  118

///

/// Empty the browser client's cache ///

Public static void clearclientPagecache ()

{

HttpContext.current.Response.buffer = true;

HttpContext.current.Response.expires = 0;

HttpContext.current.response.expiresabsolute = datetime.now.adddays (-1);

HttpContext.current.response.addheader ("prgma", "no-cache");

HttpContext.current.response.addheader ("Cache-Control", "Private");

HttpContext.current.response.cachecontrol = "no-cache";

}

转载请注明原文地址:https://www.9cbs.com/read-14384.html

New Post(0)