I am making a Kiosk application that multiple people may use one after the other. They need to put in some personal information and possibly even a credit card. Once they press 'submit' it will process the information and redirect them to a confirmation page.
However, I need to completely disable the back button in some way, so the next user cannot go back and take the previous client's information.
In my controller, I am using return RedirectToAction() not return View(). This helped the page not resubmit if the client presses the back button, but does not clear the form. I've also tried variations of:
window.history.forward();
This did not work AT ALL. When I had my controller return View(), this JavaScript prevented the user from going back, but flickered the previous page so you could see the information for about a second before it redirected back to the current view.
I have no issues completely disabling the back button for the entire application if that's the route I have to go. I just don't know HOW. I am not married to the idea of disabling the back button; if there are other solutions that will do this, I'm fine with trying those as well.
EDIT: There is a similar question that has been asked, but none of those solved the issue. Specifically, that question discusses disabling going back when log out occurs (clear session/clear cashe/etc). For my question, I cannot clear the session, because it will log the vendor out and the requirements documents specifically state that the vendor's session will be active for 8 hours, unless logged out.