我知道这是stackoverflow上一个常见的问题。我已经查看了每一个相同的问题,但是我无法找到适合我的正确答案。 这是我的注销控制器Action结果
[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"/>
这些都没有解决我的问题。