Auto refresh function in every 30 seconds without reload the page in javascript
Loading
Auto refresh function in every 30 seconds without reload the page in javascript
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Chris LovePosted Oct 13, 2023, 10:17 AM
Great question
Now to answer your question you can use a setInterval like this:
setInterval(() => {
muFunction();
}, 30000);
Raj BhattPosted Oct 14, 2023, 2:34 AM
you can use the
setIntervalfunction to implement an auto-refresh function that executes a specified function at regular intervals