【发布时间】:2015-05-20 08:41:16
【问题描述】:
我正在尝试类似的东西: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();
}};
这个问题有更新的解决方案吗?
非常感谢!
【问题讨论】:
-
这行得通 :-) 你能把这个作为答案发布,这样我就可以将问题标记为完成了吗?
-
我已将其添加为答案
标签: javascript jquery browser-history page-refresh