How does the front end monitor the page after leaving for 5 minutes and come back to refresh the page?

because the web page is a sports data web page, the page will be stuck when you hang a large amount of data in the background on the weekend, so please tell us how to monitor the page hanging in the background for more than a certain period of time and prompt the user to click to confirm and refresh the page?

Mar.02,2022

(function(){
  var ev = 'hidden' in document ? 'hidden' :    
        'webkitHidden' in document ? 'webkitHidden' :    
        'mozHidden' in document ? 'mozHidden' :    
        null;
    var state = ev.replace(/hidden/i, 'visibilitychange'),d;
    var pageChange = function(){
        if (!document[ev]) {
            (new Date().getTime()-d>5000)?(console.log('5s'),d = new Date().getTime()):(console.log('5s'));
            document.title= "';
        }else{
            d = new Date().getTime();
            document.title = "';
        }
    }
    document.addEventListener(state, pageChange);
})();
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7bc28e-2581c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7bc28e-2581c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?