I have developed a website that is designed to function without keeping any browser history, aside from the main page. This was primarily done for security reasons to ensure that the server and browser state always remain in sync.
Is there a method by which we can intercept the browser's "back" button so that users are directed to an internal "back" button instead of exiting the site completely when they are not on the main page?