如何清除MVC应用程序中的浏览器缓存?

我想清除MVC应用程序中的浏览器缓存.

I want to clear the browser cache in MVC application.

我在.cshtml页面上添加了以下代码,该代码适用于IE和Firefox.

I added the below code on my .cshtml page and its working for IE and Firefox.

    Response.ExpiresAbsolute = DateTime.Now;
    Response.Expires = 0;
    Response.CacheControl = "no-cache";
    Response.Buffer = true;
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetExpires(DateTime.UtcNow);
    Response.Cache.SetNoStore();
    Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);

我正在寻找一种适用于chrome的解决方案.

I am looking for a solution which will work on chrome as well.



 1 条回答