I'm reloading the page like this window.location.reload();
is there a way to have it do the same thing but after 2 seconds?
Asked
Active
Viewed 64 times
-4

Nancy
- 1,021
- 4
- 23
- 45
-
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout – j08691 Dec 09 '19 at 14:28
-
1Does this answer your question? [Refresh Page for interval using js](https://stackoverflow.com/questions/12038183/refresh-page-for-interval-using-js) – Ben Souchet Dec 09 '19 at 14:29
1 Answers
2
You can use setInterval
or setTimeout
functions available in Javascript.
Refer to the SO question for its working. - setTimeout or setInterval?

stud3nt
- 2,056
- 1
- 12
- 21