Chrome 41:按下后退按钮时强制重新加载

时间:2015-03-17 18:43:06

标签: javascript jquery browser-history page-refresh

我正尝试类似的事情:Force reload/refresh when pressing the back button

不幸的是,建议的代码在Chrome 41中不起作用:

window.onpageshow = function(evt) {
// If persisted then it is in the page cache, force a reload of the page.
if (evt.persisted) {
    document.body.style.display = "none";
    location.reload();
}};

这个问题有更新的解决方案吗?

非常感谢!

1 个答案:

答案 0 :(得分:0)

check this question使用localStorage / sessionStorage解决问题。

相关问题