Comments (12)
Please "View Source" of the page in the non-working browser, and make sure the store.js is correctly loaded. That error message is generated only if 'store.js' is not enabled or not available. Also check that IE11 is not set for InPrivate Browsing.
from jquery-idletimeout.
Thanks so much for your comment, JillElaine!
I have made sure that IE11 is not in InPrivate Browsing mode.
I have also loaded "store.min.js" file - if this had not been loaded properly, I would guess other web browsers would have failed.
Other than the Store.min.js, is there anything else I would need to in order to properly load store.js ?
Thanks!
from jquery-idletimeout.
Please use a Javascript console debugger such as the one in Firefox's 'Developer'. https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console
View the information to check the correct loading of all required scripts, and watch for error messages.
Please read the Installation > script tag on marcuswestin's store plugin. https://github.com/marcuswestin/store.js#user-content-installation
You might try using the marcuswestin script store.legacy.min.js instead of store.min.js?
from jquery-idletimeout.
Any news, R5ty5tt?
from jquery-idletimeout.
Thanks JillElaine!
I don't seem to find any clues from FireFox's debugger.
I have tested store.legacy.min.js but it didn't work. I also tested store.modern.min.js and store.everything.min.js; but they didn't work, either.
What seems to be most successful has been "store.min.js" file. I have downloaded the latest version of store.min.js file into a local folder, and it is loaded using the following line of script.
<script src="../Plugins/store.min.js" type="text/javascript"></script>I believe this is how this should be "installed." Is there anything I am missing here? Are there any other script files that should also be placed in the same folder?
Based on the above, the timeout plugin works perfectly on Chrome, FireFox, Edge, and IE on Windows 10.
The IE11 on Windows 2012 R2 is giving me the error. See the image below - the left is from Chrome, and the right is from IE11 on Win 2012 R2.
from jquery-idletimeout.
I appreciate that you are working hard to test the script in a variety of browsers & OSs. I have not had anyone report this problem before, but I suspect it is an issue with Windows 2012 R2 + IE11.
If you are unsure how to load an external Javascript, please read the information here: https://www.w3schools.com/js/js_whereto.asp There are many ways to determine if a Javascript file is loaded. All the dependencies for the idleTimeout script are listed in the README.md. There are no other dependencies for the idleTimeout script.
I wonder what will happen if you disable the error message in the idleTimeout script? Perhaps it is a bogus error? The script stops if the error is thrown, so you will need to disable the error.
To disable the error message, you will need to edit the code. This is easy to do. Please download the "un-minified" idleTimeout script: https://github.com/JillElaine/jquery-idleTimeout/blob/master/jquery-idleTimeout.js
Open the downloaded script in a code editor. Don't use Windows Notepad, as it adds extraneous characters to files. There is a Notepad++ editor that will work though. http://www.wpbeginner.com/showcase/12-best-code-editors-for-mac-and-windows-for-editing-wordpress-files/
In your code editor, at the bottom of the idleTimeout script, replace the "construct" function.
ORIGINAL CODE
return this.each(function () {
if (store.enabled) {
store.set('idleTimerLastActivity', $.now());
store.set('idleTimerLoggedOut', false);
activityDetector();
if (currentConfig.sessionKeepAliveTimer) {
startKeepSessionAlive();
}
startIdleTimer();
} else {
alert(currentConfig.errorAlertMessageedit);
}
});
REPLACE WITH
return this.each(function () {
store.set('idleTimerLastActivity', $.now());
store.set('idleTimerLoggedOut', false);
activityDetector();
if (currentConfig.sessionKeepAliveTimer) {
startKeepSessionAlive();
}
startIdleTimer();
});
As you can see, the change to the code removes the "test"if (store.enabled)
. Be careful not to change anything else. A missing comma or parenthesis can break the code.
Save your edited code with a new name - e.g. "jquery-idleTimeout-no-test.js", and then load the modified script into your webpage.
EXAMPLE
<script src="../Plugins/JillElaineidleTimeout/jquery-idleTimeout-no-test.js"></script>
Please test and let me know.
from jquery-idletimeout.
JillElaine, thanks so much for your continuing help and advice.
I have used your alternative code that disabled the error message. It disabled the pop-up error, but the IE won't still time out properly. So, bypassing that didn't help. But I greatly appreciate your suggestion.
So, I found a block of code that verifies whether an external script has been loaded.
`<script>
//great suggestion @Jasper
var len = $('script[src*="../Plugins/store.min.js"]').length;
if (len === 0) {
alert('script not loaded');
loadScript('../Plugins/store.min.js');
if ($('script[src*="../Plugins/store.min.js"]').length === 0) {
alert('still not loaded');
}
else {
alert('loaded now');
}
}
else {
alert('script loaded');
}
function loadScript(scriptLocationAndName) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = scriptLocationAndName;
head.appendChild(script);
}
</script>`
When I inserted this script into the page in question, the IE showed "Script Loaded." So, at least, based on this code. store.min.js seems to have been uploaded.
I do not completely understand how web browser works, but here are tricky things:
when I use the IE11 on my Windows 10 to run this page using a local testing server in my computer, the time-out plugin works great. But using the same IE11 on my Windows 10, when I access the 2012 R2 server via a VPN connection, the timeout plugin stops working (just like the IE11 on the 2012 R2 server does not work).
I wonder if Windows 2012 R2 is imposing some restrictions on IE11 in terms of using jQuery/javascript.
JillElaine, could you think of anything else that I could try based on the progress so far?
Thanks so much!
from jquery-idletimeout.
If the idleTimeout script runs correctly on all browsers & OSs except the Windows 2012 R2, then it does seem to point to something unusual with Win2012. Some tests that may help narrow it down:
-
Run the web page directly on the Win2012 server without using VPN (eliminates VPN as part of the problem)
-
Run the web page in a browser other than IE11 on the Win2012 (eliminates the browser as part of the problem)
-
Check for user or group policies on the Win2012 that affect Private Mode
My guess is that there is a setting in the Internet Information Services II server on the Win2012 box that is forcing the site into Private Mode or something similar. I suggest you talk to the Server Admin.
Some related information here: https://msfreaks.wordpress.com/2013/12/29/step-by-step-customizing-rd-web-access-2012-r2/
from jquery-idletimeout.
Thanks JillElaine!
I have tested the IE11 on the Win2012 server directly without using a VPN, and it doesn't work. So, I don't think VPN is an issue here.
I have tested Chrome on the Win2012, it works perfect. So, the problem is only with the "IE11 on the Win2012."
I will contact the server administrator about the private mode; and keep you updated. Thanks again!
from jquery-idletimeout.
The idleTimeout script uses 'localStorage' (via the store.js plugin from Marcus Westin) to set & retrieve a few variables. These localStorage variables are available across multiple browser windows and tabs, so the idleTimeout script can keep them in synch. The 'test' in the idleTimeout script just checks if the script can set a localStorage variable. If it can't, then the script prints the error and exits. https://en.wikipedia.org/wiki/Web_storage
from jquery-idletimeout.
Hi JillElaine,
Finally, a solution was found. I realized that IE11's default setting of "Display intranet sites in Compatibility View" has overridden the tag " "
This tag is supposed to force IE11 to run in the Edge mode, but it seems that it has not been the case in an intranet site when IE11 has this default setting of compatibility view turned on. After I uncheck this option, now the time-out plug-in works like a charm in IE11. Thanks so much for all your help, and I have learned a lot in this process from you. I greatly appreciate your wonderful help along the way!!!
from jquery-idletimeout.
I am so glad you solved the issue! IE's 'compatibility view' can cause many subtle problems with sites. Thank you for posting the solution.
from jquery-idletimeout.
Related Issues (20)
- Is there a way to change the timeout duration at runtime? HOT 5
- Dependency on jQuery UI for pop up. HOT 1
- Session time out counter show NAN HOT 15
- iframe inactivity detection bug HOT 2
- Accessing the $.fn.idleTimeout() after it was initialized HOT 1
- customCallback repeating call if redirectUrl: false HOT 2
- IE recursive loop crash. HOT 7
- Does not function if the page is having frameset HOT 2
- Cannot find any error handling callback HOT 2
- Session lost when there is a pending AJAX request HOT 7
- Unable to change dialogue on buttons, HOT 19
- Configuration issue - activityEvents override without mousemove HOT 7
- Releasing jquery-idleTimeout under MIT license HOT 7
- Logged out of iframes, not main page HOT 4
- IE 11 Tabs or windows not communicating when over 2 tabs. HOT 2
- IE-11 windows 10 multiple logout calls HOT 1
- How much of jquery-ui do you need to bundle? HOT 3
- Uncaught TypeError: $(...).idleTimeout is not a function HOT 1
- store.js HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-idletimeout.