Well the actual problem is that when the web app session timed out ... sometimes there pops up a HTTP 500 error ranging from NullPointerException, ArrayOutOfBoundsException or some other exception when the user goes back a page. So I thought if I prevent the user going back then under such circumstances none of these exceptions will occur.
I understand so-called hacking the browser is not the way to go.
The best approach would be to find out why the exceptions are occurring and fix that problem. Surely the stack traces will be useful to find out why the requests are failing when using the back button?
I'd also advise reading this article and paying particular attention to the PRG pattern. It will help to make sure that requests behave in a deterministic fashion.