I have a Login and Logout method with remember me. After Logout from 'index' page(authorized), I can still go back to 'index' with browser's(chrome) back arrow. Is this because of remember me? How can I totally logout from my website?
This happens even Remember Me is checked or not checked. I tried clearing browser cache and history.
[HttpPost]
public ActionResult Login(LoginModel loginModel)
{
User user = db.Users.Where(u => u.Username.Equals(loginModel.Username) && u.Password.Equals(loginModel.Password)).FirstOrDefault();
if (user != null)
{
FormsAuthentication.SetAuthCookie(user.UserPkID.ToString(), loginModel.RememberMe);
return RedirectToAction("Index", "Home");
}
else
{
return View();
}
}
[HttpGet]
public ActionResult Logout()
{
FormsAuthentication.SignOut();
return RedirectToAction("Login");
}