HTML5のHistory APIを利用して、ブラウザの「戻る」を無効化する。
// このコードはjQueryを仕様しています。
if(window.history && window.history.pushState) {
var stateName = 'samePage';
history.pushState(stateName, null, null);
$(window).on('popstate', function (e) {
if (history.state === stateName) {
alert(history.state);
}
});
}