Disabling Back button on the browser

Haoest picture Haoest · Sep 17, 2008 · Viewed 43.6k times · Source

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?

Answer

Scott Hanselman picture Scott Hanselman · Sep 17, 2008

It's not possible, sadly. However, consider your applications navigation model. Are you using Post/Redirect/Get PRG Model? http://en.wikipedia.org/wiki/Post/Redirect/Get?

This model is more back button friendly than the Postback model.