Disable back for javascript

About the only way to keep the user from accessing a page in history is to prevent the page from being placed in history with location.replace(). Otherwise, the history is pretty much off limits for scripts, for obvious security reasons.