I am writing an application that if the user hits back, it may resend the same information and mess up the flow and integrity of data. How do I disable it for users who are with and without javascript on?
相关问题
- TestCafe - The browser always starts in clean slat
- UrlEncodeUnicode and browser navigation errors
- Character Encoding in iframes
- How to load local *.htm file to WPF WebBroswer wit
- Selenium newer Chrome cannot disable browser notif
相关文章
-
Is it bad to put elements within the <hea
- Calling Chrome web browser from the webbrowser.get
- How can a browser know the scss files?
- Is there a way to specify minimum and maximum zoom
- How to invoke phone dialer in browser? or is it im
- Can't detect Android in web server
- Android browser scaling?
- Form being randomly submitted as GET instead of PO
查看全部
Whatever you come up with to disable the back button might not stop the back button in future browsers.
If its late in the development cycle I suggest you try some suggestions above but when you get time you should structure your flow so that the back button does not interfere with the logic of your site, it simply takes the user back to the previous page like they expect it to do.
I was able to accomplish this by using:
When I used Response.Cache.SetCacheability(HttpCacheability.NoCache); it prevented me from downloading office files.
It is true, proper validation should be added to make sure duplicate data doesn't mess things up. However, as in my case, I don't full control of the data since I'm using some third party API after my form. So I used this
This will send user forward to the "receipt" which is supposed to come after "payment" page if they try to go back to "payment" page (just giving a payment for example). Use sparingly, though
4 Guys from Rolla wrote this article on disabling the back button a long time ago (in a galaxy far far away): http://www.4guysfromrolla.com/webtech/111500-1.shtml
You could post the data on each form to a _NEW window. This will disable the back button on each window, but without javascript it might be difficult to force the old one closed.
It is possible to disable back button in all major browser. It just uses hash values to disable the back button completely. Just put these 5 lines of code in your page
Detailed description