钉钉和微信,监听自带的返回功能事件,刷新页面

 

判断页面是不是从缓存中读取的,如果是就刷新页面

钉钉和微信,监听自带的返回功能事件,刷新页面

window.addEventListener(‘pageshow‘, function(e) {
if (e.persisted) {
window.location.reload()
}
})