Forum Moderators: open

Message Too Old, No Replies

Forcing a page to time out from the browser

Browser and Time outs

         

antgod

5:21 am on Sep 8, 2005 (gmt 0)

10+ Year Member



Hi All,

Is there a way, say settings I can play around from the browser (IE, Netscape, Mozilla Firefox) where I can force a page access to time out?

Thanks,

Dijkgraaf

12:17 am on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Will something like the following JavaScript do?
This is code in a common JavaScript include, where onload would call setAutoLogout(), and you could overide autologout by setting it to one in the page.

var autologout=1;

function setAutoLogout() {
logout=window.setTimeout("CheckLogout()",5000); // time in milliseconds
}

function CheckLogout() {
if (autologout==1)
top.window.location = '/Auth/Login.asp?Logout=TRUE';
}