开发者

How to disable the back button without relying on Javascript?

开发者 https://www.devze.com 2023-03-02 17:26 出处:网络
I开发者_运维技巧\'ve seen some web sites like banking applications that prevent the user from using the back button. If I remember correctly, when you press the back button your session times out.

I开发者_运维技巧've seen some web sites like banking applications that prevent the user from using the back button. If I remember correctly, when you press the back button your session times out.

How can I do this?


No, don't do that; don't surprise the user. The back button is there so it can be used. If that's a problem for you, find a way around it, not prevent it.

Use the Post/Redirect/Get pattern @benjynito mentioned in the comment.


You cant disable browser's back button just use that, I found here

Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
0

精彩评论

暂无评论...
验证码 换一张
取 消