Chrome 41:按下后退按钮时强制重新加载 [英] Chrome 41: Force Reload when pressing the back button

查看:89
本文介绍了Chrome 41:按下后退按钮时强制重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试类似的操作:强制重新加载/刷新按下后退按钮时

I'm trying something similar to this: Force reload/refresh when pressing the back button

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

Unfortunately, the suggested code doesn't work in 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();
}};

是否有解决此问题的新方法?

Is there a newer solution to this problem?

非常感谢!

推荐答案

Please check this question that addresses the problem using localStorage/sessionStorage.

这篇关于Chrome 41:按下后退按钮时强制重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆