【发布时间】:2011-03-18 13:47:36
【问题描述】:
我需要使我的内容过期,这样当用户点击浏览器的导航(返回)按钮时,控制器操作就会被执行。因此,不要将以下代码添加到每个
行动有没有更好的方法来做到这一点。
HttpContext.Response.Expires = -1;
HttpContext.Response.Cache.SetNoServerCaching();
Response.Cache.SetAllowResponseInBrowserHistory(false);
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();
【问题讨论】:
标签: asp.net asp.net-mvc-3 razor