// thanks for stackoverflow 返回的时候强制刷新 window.addEventListener('pageshow', function (event) { console.log('performance', window.performance); if (event.persisted || (window.performance && window.performance.navigation.type == 2)) location.reload(); });参考网址
- https://www.jianshu.com/p/a94aa53f3637
https://juejin.cn/post/6844904002103033870
https://stackoverflow.com/questions/17432899/javascript-bfcache-pageshow-event-event-persisted-always-set-to-false