Code Project

Link Unit

Tuesday, August 25, 2009

Auto Refresh in Chrome

I work with all type of Browser including the new entrant Chrome. Other browsers have some plugin or addon which help to auto refresh the page. So I tried to figure out Does Chrome have an auto-reload option (per tab) ?? 
The answer was google search away.

Just create a bookmark with the following code as the URL:

javascript:
timeout=prompt("Set timeout [s]");
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload(){
setTimeout('reload()',1000*timeout);
fr4me='';
with(document){write(fr4me);void(close())};
}


Click the bookmark with the tab you want to auto-reload active.
Set the time interval (in seconds) or set it to zero to cancel auto-reload.

Hope it Helps
Jatinder Singh

No comments: