If you build a one page web app (meaning a single page is loaded, then all changes are done dynamically in that page with Javascript) you have options:
When the user clicks the back button, you leave the page, since it's the only one, and you can warn the user through the event window.onbeforeunload
And then, if you need/want more control of the back/next button behaviour, you can add a hash( # ) key to handle that.
See my answer to that question: Change the get parameters in the address bar in jquery