Redian新闻
>
about preventing history back in ASP.NET
avatar
about preventing history back in ASP.NET# DotNet - 窗口里的风景
e*e
1
Hi
I have a simple web application which requires Forms authentication.
My problem is when a user logs out, by pressing Back button in IE,
the former page, which requires a proper authentication, will be shown.
How to prevent this?
Have tried to put int the Page_Load method the following:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
but it doesn't work.
Application is configured to be cookieless.
3ks.
avatar
b*e
2
one way is to use JavaScript

【在 e****e 的大作中提到】
: Hi
: I have a simple web application which requires Forms authentication.
: My problem is when a user logs out, by pressing Back button in IE,
: the former page, which requires a proper authentication, will be shown.
: How to prevent this?
: Have tried to put int the Page_Load method the following:
: Response.Cache.SetCacheability(HttpCacheability.NoCache);
: but it doesn't work.
: Application is configured to be cookieless.
: 3ks.

avatar
k*i
3
put window.history.forward(1) in the page

【在 e****e 的大作中提到】
: Hi
: I have a simple web application which requires Forms authentication.
: My problem is when a user logs out, by pressing Back button in IE,
: the former page, which requires a proper authentication, will be shown.
: How to prevent this?
: Have tried to put int the Page_Load method the following:
: Response.Cache.SetCacheability(HttpCacheability.NoCache);
: but it doesn't work.
: Application is configured to be cookieless.
: 3ks.

avatar
G*T
4

the best way to use cookie, if no cookie, then
1) use a global variables
2) when logout set it as false
3) when load other pages, check it
if false, no load
o/w, set it as true

【在 k****i 的大作中提到】
: put window.history.forward(1) in the page
avatar
e*e
5
how? am new to web programming

【在 b*e 的大作中提到】
: one way is to use JavaScript
avatar
e*e
6
sorry but i don't quite understand
are you referring to some web browser control?

【在 k****i 的大作中提到】
: put window.history.forward(1) in the page
avatar
e*e
7
okay, thanks.
going to try it out

【在 G**T 的大作中提到】
:
: the best way to use cookie, if no cookie, then
: 1) use a global variables
: 2) when logout set it as false
: 3) when load other pages, check it
: if false, no load
: o/w, set it as true

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。