Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JavaScript: Auto-Log Out user after x min.

Featured Replies

hello People!

I know this might not be news to some but I just though of using this function.

LogOut user (close the frame or window) after an X amount of time!

Someone else might benifit from it so here it is:

<script>

var myMinutes=1; // declare how many minutes you want allowed on the site/page

var myTime = myMinutes * 60; // convert time from minutes into seconds

var LogOut = myTime * 1000;// convert time from seconds into milliseconds

t = null;

function AutoLogOut()

{

t = setTimeout("top.window.close()",LogOut);// if you use frames -if no Frames use: window.close

}

</script>

<body onLoad="AutoLogOut();">

adjust your "minute needs"!

Another approach would be (if you are using cromeless windows) is to redirect user to either blank-not important-page or Login page by using:

.....

..

<meta http-equiv="refresh" content="60;URL=Login.html">

</head>

where user is redirected to Login page after x (60 here) seconds

There my little contribution smile.gif

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.