View Full Version : Unable to refresh page with delay using java script in address bar

10-28-2009, 12:21 AM
Hi all,

i started learning java script recently....Please help me to learn it.....


I am trying to refresh a page for every 30 mins by running java script in the address bar....

But unfrotunately it is working just once and getting aborted....

javascript: for(i=1;i<100;i++){setTimeout(location.reload(true),3000);}

Thanks in advance...


10-28-2009, 12:46 AM
Every time the page is refreshed, all pending intervals and timeouts are effectively canceled. This is because, once the page reloads, nothing in javascript is carried forward.

So this cannot be done in the address bar. But if you have access to the pages code, you could see to it that upon each page load a timeout for a reload in 3 seconds was set.