Add the timer code in the chrome console, how can the code continue to execute after the page is refreshed?

for example, write a timer in the console and call a method in the page regularly, but the page will be refreshed after the method is executed, so the timing code of the console will be invalid after the page is refreshed. Is there any way to solve it?


record the time in cookies, and then compare the current time with the time recorded by cookies.


the method of this article can be https://blog.csdn.net/samt007.

.
timeout=prompt("Set timeout (Second):");
count=0
current=location.href;
if(timeout>0){
    setTimeout('reload()',1000*timeout);
} else{
    location.replace(current);
}
function reload(){
    setTimeout('reload()',1000*timeout);
    countPP;
    console.log(''+timeout+',:'+count);
    fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>';
    fr4me+='</frameset>';
    with(document){write(fr4me);void(close())};
}

realize "automatic refresh" by reloading the contents of frame (that is, current links) by using frame nesting target web page links

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-1b376a9-2b3f6.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-1b376a9-2b3f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?