Git Product home page Git Product logo

Comments (2)

andyrivera255 avatar andyrivera255 commented on August 20, 2024 4

I got this working by adding an empty onstorage function. Below is the corrected full script tag for the example.html file. Basiclally the onstorage function is forcing Internet Explorer 11 to synchronize the tabs before it does the store.get.

Hope this helps someone.

window.onstorage = function (e) {
  //Leave this empty
  //workaround for IE11 localstorage synchronization problem.
  //the event
};
<script type="text/javascript" charset="utf-8"> $(document).ready(function (){ $(document).idleTimeout({ redirectUrl: '/logout', // redirect to this url on logout. Set to "redirectUrl: false" to disable redirect // idle settings idleTimeLimit: 1200, // 'No activity' time limit in seconds. 1200 = 20 Minutes idleCheckHeartbeat: 2, // Frequency to check for idle timeouts in seconds // optional custom callback to perform before logout customCallback: false, // set to false for no customCallback // customCallback: function () { // define optional custom js function // perform custom action before logout // }, // configure which activity events to detect // http://www.quirksmode.org/dom/events/ // https://developer.mozilla.org/en-US/docs/Web/Reference/Events activityEvents: 'click keypress scroll wheel mousewheel mousemove', // separate each event with a space // warning dialog box configuration enableDialog: true, // set to false for logout without warning dialog dialogDisplayLimit: 20, // 20 seconds for testing. Time to display the warning dialog before logout (and optional callback) in seconds. 180 = 3 Minutes dialogTitle: 'Session Expiration Warning', // also displays on browser title bar dialogText: 'Because you have been inactive, your session is about to expire.', dialogTimeRemaining: 'Time remaining', dialogStayLoggedInButton: 'Stay Logged In', dialogLogOutNowButton: 'Log Out Now', // error message if https://github.com/marcuswestin/store.js not enabled errorAlertMessage: 'Please disable "Private Mode", or upgrade to a modern browser. Or perhaps a dependent file missing. Please see: https://github.com/marcuswestin/store.js', // server-side session keep-alive timer sessionKeepAliveTimer: 600, // ping the server at this interval in seconds. 600 = 10 Minutes. Set to false to disable pings sessionKeepAliveUrl: window.location.href // set URL to ping - does not apply if sessionKeepAliveTimer: false }); }); window.onstorage = function (e) { //Leave this empty //or add code to handle //the event // alert('here'); }; </script>

from jquery-idletimeout.

yurakis avatar yurakis commented on August 20, 2024

window.onstorage = function (e) {
//Leave this empty
//workaround for IE11 localstorage synchronization problem.
//the event
};

This worked for me! Thank you so much!

from jquery-idletimeout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.