我正在尝试类似的事情:按后退按钮时强制重新加载/刷新 https://stackoverflow.com/questions/9071838/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();
}};
这个问题有更新的解决方案吗?
多谢!
Please 检查这个问题 https://stackoverflow.com/questions/19953382/how-to-force-page-refresh-on-browser-back-click使用 localStorage/sessionStorage 解决问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)