page should be expired if its idle
HI,
How do i expire a page if its idle for more than 10 minutes..
Thanks in advance..
HI,
How do i expire a page if its idle for more than 10 minutes..
Thanks in advance..
Add the following to the HTML head:<meta http-equiv="refresh" content="600;url=expired.jsp">
Where "600" is the amount of seconds to timeout (10 minutes = 600 seconds) and where "expired.jsp" is the page where the user should be redirected to after 600 seconds.
HI BalucS,
The script is working perfectly fine.
Thanks so much..
I have question here..
if i refresh the page will counter reset & the starts counting...
Refesh != idle.
Hi
wht i noticed is if i am working on tht page(can be entering data for ex..) ,still the page is being expired..i dont want this to happen..How do i tackle ?
Thanks in advance...
Replace it all by a Javascript onload function with setTimeout("window.location") and capture the onkey/onmouse events which should reset the timeout back if an user triggers a key or mouse.
Hi Balu thanks for ur help
I did it..
<html>
<head>
<script type="text/javascript">
var i=10;
function delayer(){
document.LoginForm.test.value=i;
i--;
if(i==0)
{
window.location = "../javascriptredirect.php"
}
else {
setTimeout('delayer()', 1000)
}
}
function Reset()
{
i=10;
//alert("testing");
}
</script>
</head>
<body onLoad="delayer()" onmousemove="Reset()">
<form name="LoginForm">
///just for user to chk the duration
<input type=text name=test>
</form>
</body>
</html>