浏览器后退强制刷新,不加载缓存

if (document.addEventListener) {
    window.addEventListener('pageshow', function (event) {
        if (event.persisted || window.performance && 
            window.performance.navigation.type == 2) 
        {
            location.reload();
        }
    },
   false);
}

你可能感兴趣的:(javascript,html,前端)