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..

[104 byte] By [gania] at [2007-11-27 10:28:18]
# 1

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.

BalusCa at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

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...

gania at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Refesh != idle.

BalusCa at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

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...

gania at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

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.

BalusCa at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

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>

gania at 2007-7-28 17:50:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...