js监听当前页面再次加载

document.addEventListener("visibilitychange", function () {
        if (!document.hidden) {   //处于当前页面
            location.reload()
        }
    });
原文地址:https://www.cnblogs.com/shark1100913/p/11218431.html