Stop javascript auto refresh after fix time for example 1 min
<p>I am using setTimeout(javascript function) to auto refresh page for each 10 sec, and after one(1) min i want to stop auto refresh.For this i am using clearTimeout() javascript function.
I know this is not possible because each time when page refresh all javascript variables and functions re-initialize.</p>

<p>I think this may be possible from server side (using session variable)
Please Help Us To Solve This Problem,Thanks In Advance.....</p>

<p>my code for testing given below</p>

<pre><code>&lt;html&gt;
&lt;script type="text/javascript"&gt;
var t;
var j;
function load()
{
t=setTimeout("refresh()", 10000);
j=setTimeout("stop()", 60000);

}
function refresh(){
window.location.reload()
load()
}

function stop(){
clearTimeout(t);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="load()"&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
