Hello I am developing a solution in MVC in first time so I am facing a big issue,
When I logout from my application(mvc razor web application) it displays login page, but if i press browser back button it displays last screen, i don't want this, i want if i press back button it still display same login page.
here is my code for logout
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");
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…