Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Greasemonkey script to reload the page every minute

How to reload a page every 60 seconds?

My attempt:

setTimeout (location.reload, 1 * 60 * 60);

I'm not sure what those numbers mean, or how to adapt them to reload after 60 seconds only.

like image 385
Hiya Avatar asked Aug 25 '14 11:08

Hiya


1 Answers

setTimeout(function(){ location.reload(); }, 60*1000);

You have to pass a full function as first argument, and second is the time in millisecond. So in your case, 60 * 1000

like image 138
Aryess Avatar answered Oct 20 '22 20:10

Aryess