且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

注销后如何禁用浏览器返回的bottun.

更新时间:2023-12-02 12:45:46

您好,

无法完全删除后退按钮功能.但是有几种解决方法.
请阅读以下解决方案:

http://www.irt.org/script/311.htm [ http://msdn.microsoft.com/de-de/library/system.web.security.formsauthentication.signout.aspx [ ^ ]

身份验证:
http://msdn.microsoft.com/en-us/library/eeyk640h.aspx [ ^ ]

州:
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx [ ^ ]

如果要防止注销后单击后退"按钮时向用户显示页面的最后"数据,请不要缓存受保护的页面,也不要检查凭据,否则将它们重定向.如上所述,此脚本是对更为重要的基本"安全设置的补充.



致以最诚挚的问候
Hi,

it''s not possible to completly remove back button function. But there are several workarounds out there.
Please read this solution:

http://www.irt.org/script/311.htm[^]

An important point from SAKryukov (in my words):

Such blocking of the Back Button with Javascript can be tricked out.
You should carefully check at loading your Login-Page if user credentials are valid and the forms-authentication ticket gets removed (FormsAuthentication.SingOut Method), in case they''re not valid, redirect them).
Useful links for understanding Authentication(settings description for your IIS-Server and ASP.NET Login Controls) and states:

SignOut() method
http://msdn.microsoft.com/de-de/library/system.web.security.formsauthentication.signout.aspx[^]

Authentication:
http://msdn.microsoft.com/en-us/library/eeyk640h.aspx[^]

States:
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx[^]

If you want preventing that "last" data of page is shown to users when hitting back button after logout, don''t cache the protected pages and also check credentials, otherwise redirect them. As said, this script is an addition to the much more important "basic" security settings.



With Best Regards