1 fresh(); 2 function fresh() { 3 let isPageHide = false; 4 window.addEventListener('pageshow', function () { 5 if (isPageHide) { 6 window.location.reload(); 7 } 8 }); 9 window.addEventListener('pagehide', function () { 10 isPageHide = true; 11 }); 12 }