Link to home
Start Free TrialLog in
Avatar of crm624
crm624

asked on

Is it possible to have setTimeout not restart when going to different pages on the site?

If I have setTimeout in a script in the header of my site is it possible to have it continue to run as a user goes from page to page without restarting. Is this something I could use cookies to do? Are there any examples I could look at?
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Avatar of crm624
crm624

ASKER

I'm talking about the setTimeout() Timing event to execute a function after so much time has gone by.
yes, the answer to your question is no, you can't
Avatar of crm624

ASKER

Wouldn't it be possible to time the user and store it in a cookie and then add to the cookie when they go to a different page? Then have the function execute when it gets to a certain time.
ASKER CERTIFIED SOLUTION
Avatar of Sar1973
Sar1973
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of crm624

ASKER

I was able to pass the value of a timer I made and use cookies to start from where it left off.