Session Timeout And Keep-alive Plugin With jQuery – sessionTimeout

Session Timeout And Keep-alive Plugin With jQuery – sessionTimeout

sessionTimeout is an useful jQuery plugin that popups a timeout dialog with ‘Log out’ and ‘keep Alive’ options after a certain idle time. If ‘Log Out’ is clicked, the page is redirected to a specified URL. If ‘Keep Alive’ is clicked, a keep-alive URL is requested through AJAX. If no options is selected after another set amount of time, the page is automatically redirected to a timeout URL.

Basic usage:

1. Include the jQuery sessionTimeout.js script after you’ve loaded jQuery JavaScript library.

2. Include jQuery UI’s JavaScript and CSS for the session timeout dialog.

3. Initialize the plugin on document ready. In this case, the plugin will display a warning dialog after 3 seconds and automatically redirect the page after 30 seconds.

4. More configuration options.


Author Surjit Sidhu

Surjit SidhuSurjit is a student of IT, a freelance web designer/developer and a tech writer. He deals with both front-end and back-end stuff. Whenever he is not in front of an Internet-enabled device he is probably reading a book or traveling.

Leave a Reply

Be the First to Comment!