注销后禁用返回选项 [英] Disable back option after logout

查看:109
本文介绍了注销后禁用返回选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET Web表单,我想在注销后禁用返回选项.
你能帮我吗?
谢谢

i''m using ASP.NET web form where i want to disable back option after logout.
Can u please help me out from this?
Thanks

推荐答案

在您不希望用户单击后退"以注销的页面上,请确保以下内容

1)您的页面受到正确的保护,需要凭据才能查看它们

2)您的页面具有NoCache指令

On your pages where you don''t want the user to be able to click ''back'' to once logged out, make sure the following

1) Your pages are correctly protected and require credentials in order to view them

2) Your pages have a NoCache directive

Response.Cache.SetCacheability(HttpCacheability.NoCache);



如果您执行上述两项操作,则如果用户在注销后尝试单击回去,则必须重新加载页面,这将迫使他们返回登录页面



If you do these 2 things, if a user tries to click back once they are logged out the page will have to reload, which will force them back to the login page


您可以执行此操作使用JavaScript.但是也有一些问题.
阅读此主题!
http://forums.asp.net/t/989339.aspx [
You can do it using JavaScript. But there are some problem also.
Read this thread !
http://forums.asp.net/t/989339.aspx[^]


这篇关于注销后禁用返回选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆