Empty browser client cache in .NET

xiaoxiao2021-03-06  77

///

/// 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-120906.html

New Post(0)