I want to create a timer/alert in my website that prompts the user that its 1 hour since you logged in.
The timer shouldn’t start from beginning when the page is refreshed. I tried using
setTimeout(function(){
alert('signout!!');
}, 10000);
It works fine as long as I don’t refresh the page. Any ideas are welcome. Is there any way to calculate the time from db? Im storing the log in time in db.
Thanks
I got the solution like this.
In
<head>tagThen in the body