注销后后退箭头 [英] Back arrow after signing out
本文介绍了注销后后退箭头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须使用窗体身份验证的ASP.NET应用程序。当用户点击退出按钮在页面上运行以下code。
FormsAuthentication.SignOut();
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader(杂注,无缓存);
不过还是可以只是preSS后退箭头,看到了previous页面,而无需再次登录该用户。我相信它有事情做与previous页面被缓存。我怎样才能确保它们被提示与回去再次登录?
解决方案
Response.Cache.SetCacheability(HttpCacheability.NoCache);
I have an ASP.NET application using Forms Authentication. When the user clicks the Sign Out button on the page it runs the following code.
FormsAuthentication.SignOut();
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
However the user can still just press the back arrow and see the previous page without needing to log in again. I am sure it has something to do with the previous page being cached. How can I make sure they are prompted to log in again with going back?
解决方案
Response.Cache.SetCacheability(HttpCacheability.NoCache);
这篇关于注销后后退箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文