-
Notifications
You must be signed in to change notification settings - Fork 79
General Troubleshooting
####NOT WORKING AS EXPECTED?
If you have problems and your issue is not addressed here or on the Iframes wiki page, please open an issue or send an email to the developer.
Many issues may be resolved by understanding how the script works. Please 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 with the [Developer tools] (https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox) that are included in Firefox.
Jquery-idleTimeout-for-testing.js includes iframe functionality and is heavily commented. You can learn quite a bit by reading its code.
####TYPO OR CODE SYNTAX PROBLEM? Many issues can be traced to a typo, misspelling, missing semi-colon or comma, or other code syntax problem. The Public Configuration Variables are case-sensitive and must be spelled correctly.
Please note that you must clear your browser's cache each time you make a change in the configuration or in the loading of the dependent scripts. If you do not clear the cache, you won't be able to see the effects of your efforts.
And, remember, if you've been staring at the code for a while and can't find the problem, get a friend to look, or try again in the morning: a fresh pair of eyes is good!
####DEPENDENCIES MET? Required - load before jquery-idleTimeout. Make sure you have the right version.
- JQuery core version 1.7 or newer
- JQuery UI version 1.9 or newer
- Marcuswestin's store.js, version 1.3.4 or newer: https://github.com/marcuswestin/store.js
JQuery core and JQuery UI may be loaded from Google's hosted libraries.
Example - Load Google Hosted Libraries:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
Typically, all four scripts (jquery core, jquery-ui, store, and jquery-idleTimeout) should be loaded on your site's main page or on your site's 'login' page. You do not need to load these scripts multiple times: loading them multiple times can create problems!
Please note that you must clear your browser's cache each time you make a change in the configuration or in the loading of the dependent scripts. If you do not clear the cache, you won't be able to see the effects of your efforts.
Use a browser like Mozilla Firefox with the [Developer tools] (https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox) that are included in Firefox to check that these four scripts are loaded and available on your page.
####ALL REQUIRED SCRIPTS LOADED?
Do you have the correct paths to the loaded scripts? View the page 'source', and look for the <script>...</script>
tags. The links within the <script>
tags should go to the correct script. If the links don't work correctly, perhaps the 'path' is incorrect?
Example - Load store.js and jquery-idleTimeout scripts
<script src="javascripts/store.min.js" type="text/javascript"></script>
<script src="javascripts/jquery-idleTimeout.min.js" type="text/javascript"></script>
####JQUERY-IDLETIMEOUT SCRIPT CALLED? Typically, you would call the jquery-idleTimeout script in a 'document ready' function on your main or login page. You do not need to call jquery-idleTimeout multiple times. Once it's loaded, it should be available. Use something like Firefox with the [Developer tools] (https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox) that are included in Firefox to check that the scripts are loaded.
Document Ready Example:
$(document).ready(function () {
$(document).idleTimeout({
redirectUrl: '/logout' // redirect to this url. Set this value to YOUR site's logout page.
});
});
####IDLE TIMEOUT REDIRECTS TO '404 PAGE NOT FOUND'? Note that you must include and set the public configuration variable, redirectUrl, to your site's logout or redirect page in the 'document ready' function. If you receive a '404 Page Not Found' at timeout, it is likely because this variable was not correctly configured.
For more information on variables, please read the Public Configuration Variables wiki page.
####IFRAMES NOT WORKING? Please read the Iframes Information & Troubleshooting wiki page for help with iframes.