Vote count:
0
I have developed an application.when I clicked on logout page is redirecting to the login page by response.redirect.But when I press the back button of my browser i redirects to the previous page.I have used the following code.
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Redirect("Default.aspx");
}
Also I have tried as suggested on stack overflow
HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
HttpContext.Current.Response.AddHeader("Expires", "0");
But it is not working.
asked 32 secs ago
not able to clear browser history after clicking llogout in asp.net
Aucun commentaire:
Enregistrer un commentaire