history.pushState(null, null, document.URL); //首页加载时候先置空
window.addEventListener('popstate', function(e) { //后退事件置空
if(document.URL.split('/')[document.URL.split('/').length - 1] == 'home') {
history.pushState(null, null, document.URL);
}
});
参考理解原理 http://www.cnblogs.com/accordion/p/5699372.html