Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I refresh my html page every 2 mins? [duplicate]

I am currently using an html page for a webview within my iOS and Android apps. I don't want to update the native code and was wondering if I could just refresh the homepage which is index.html every 2 mins? Is it possible?


1 Answers

You can try to use like this:

<meta http-equiv="refresh" content="120">

or you can use setInterval like this:

setInterval(function() {
    window.location.reload();
}, 120000); 
like image 106
Rahul Tripathi Avatar answered Sep 12 '25 23:09

Rahul Tripathi