Disable back button in All the browsers using Javascript
I'm trying to find a way to disable the browser back button.
After some googling I found this page:
According to this page the best method is using this code:
- history.pushState({ page: 1 }, "title 1", "#nbb");
window.onhashchange = function (event) {
window.location.hash = "nbb";
};
But, there is no explanation for the code.
What is "title 1"?
nbb is just an ID?
Can some one please explain the whole code a bit more?
Thanks