【发布时间】:2013-05-02 11:40:06
【问题描述】:
我知道这是 stackoverflow 中的一个热门问题。我经历了每一个相同的问题,但我无法为我找到正确的答案。 这是我的注销控制器操作结果
[Authorize]
public ActionResult LogOut(User filterContext)
{
Session.Clear();
Session.Abandon();
Session.RemoveAll();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();
FormsAuthentication.SignOut();
return RedirectToAction("Home", true);
}
它对我不起作用。 我也尝试添加 -
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
这些都没有解决我的问题。
【问题讨论】:
-
回到哪里?任何地方?还是只是一个特定的动作?
标签: c# asp.net-mvc asp.net-mvc-4 browser-cache