I would like to redirect users away from a page such that they cannot use the ‘Back’ button to return to that page. In addition, I would like to make them stay on that page, unless:
- They type something else in the address bar and navigate away, or
- They close down the tab/browser.
This probably means that after the redirect clicking on the ‘Back’ button does nothing or the ‘Back’ button is simply disabled.
What is the right way to do this across the modern browsers (e.g. IE9+, Chrome, FireFox, etc)?
I think the best way would be to use AJAX, you can also use no-cache attributes which tell the browser to store no pages in cache, which mean there won’t be any back button functionality as there would be no history.
Anyways, there are ways of course,