您好我是第一次在MVC中开发解决方案所以我面临一个大问题,当我从我的应用程序(mvc razor web应用程序)注销时它会显示登录页面,但是如果我按下浏览器后退按钮它会显示最后一个屏幕,我不会我想要这个,我想如果我按回按钮它仍然显示相同的登录页面.这是我的注销代码
public ActionResult Logout()
{
Session.Clear();
Session.Abandon();
Session.RemoveAll();
FormsAuthentication.SignOut();
this.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
this.Response.Cache.SetCacheability(HttpCacheability.NoCache);
this.Response.Cache.SetNoStore();
return RedirectToAction("Login");
}
Run Code Online (Sandbox Code Playgroud)