Skip to content
JillElaine edited this page Mar 25, 2015 · 24 revisions

###REQUEST FOR INPUT If you have a suggestion, question or problem, please submit an issue or send an email. Your feedback is appreciated.

###HOW IT WORKS The best way to understand how the idleTimeout script works is to load the jquery-idleTimeout-for-testing.js on your site, and watch the console debug log. One way to do this is to use Mozilla Firefox https://www.mozilla.org/en-US/firefox/new/ with the firebug addon: http://getfirebug.com/

Jquery-idleTimeout-for-testing.js includes iframe functionality and is heavily commented. You can learn quite a bit just by reading the code.

###USAGE Dependencies

Load the three scripts above before you load one of the jquery-idleTimeout scripts. Choose the best jquery-idleTimeout script for your situation.

Next call the jquery-idleTimeout script in 'document ready' function. Set the variable, 'redirectUrl', to your site's logout page. This is the only configuration variable you must set: all other variables can be run at their default values.

Example - run with jquery-idleTimeout defaults:

$(document).ready(function () { $(document).idleTimeout({ redirectUrl: '/logout' // redirect to this url. Set this value to YOUR site's logout page. }); });

###PROBLEMS? Please read the GENERAL TROUBLESHOOTING and IFRAMES INFORMATION & TROUBLESHOOTING pages.

###HISTORY The original script was philpalmieri's jquery-idleTimeout, but it did not have activity detection across multiple windows & tabs. A request to add this functionality was submitted, and the response from nestoru suggested the use of marcuswestin's store.js that uses local storage to communicate across browser windows and tabs. https://github.com/philpalmieri/jquery-idleTimeout/issues/2#issuecomment-20855442

Later, josebalius created a fork of philpalmieri's that included the use of marcuswestin's store.js. The JillElaine version of the jquery-idleTimeout script was forked from the josebalius version and includes additional functionality.

Couldn't have done it without GitHub's Community. Thanks for all the help & support.

Clone this wiki locally