Session Timeout
One of the most complete bootstrap admin templates!
Basic Demo
After a set amount of idle time, a Bootstrap warning dialog is shown to the user with the option to either log out, or stay connected. If "Logout" button is selected, the page is redirected to a logout URL. If "Stay Connected" is selected the dialog closes and the session is kept alive. If no option is selected after another set amount of idle time, the page is automatically redirected to a set timeout URL.
Idle time is defined as no mouse, keyboard or touch event activity registered by the browser.
As long as the user is active, the (optional) keep-alive URL keeps getting pinged and the session stays alive. If you have no need to keep the server-side session alive via the keep-alive URL, you can also use this plugin as a simple lock mechanism that redirects to your lock-session or log-out URL after a set amount of idle time.
Options:
You can customize almost everything in this plugin. You can customize title, message, logout button, logoutUrl, keep Alive button, keepAliveUrl, keepAliveInterval, warnAfter time, redirAfter time interval, countdownMessage and many others.
You can also make it dependent of user activity. Check out this pagewhere warning popup will trigger only if user is inactive for some time.
<script type="text/javascript"> $(function($) { $.sessionTimeout({ keepAliveUrl: 'keep-alive.html', logoutUrl: 'pages-login.html', redirUrl: 'locked.html', ignoreUserActivity: 'true', warnAfter: 10000, redirAfter: 20000, countdownMessage: 'Redirecting in {timer} seconds.', countdownBar: true }); });</script>