Session Timeout Warning Popup for Multiple Tabs


Click here to view the demo


A javascript function for displaying a session timeout warning popup before a user times out in an application.  Below are some highlights of it’s functionality:

  • Will only display one warning popup even if a user has multiple tabs for the application open
  • As a user browses in one tab it will reset the warning popup countdown in all other tabs so they are synchronized
  • Can display a countdown in each tab’s title area of how much time is left before the warning popup
  • Easily configure times, cookie names, URLs, and messaging.

How To Use



Option Type Default Value
iSecondsTillWarning Integer 15
iSecondsTillRedirect Integer 10
sShowCountdownCookieName String TimeoutWarningDisplay
sLastAccessTimeCookieName String TimeoutWarningLastAccessTime
sWarningURL String warning.html
sLogoutURL String logout.html
sPopupBlockedMessage String Your browser blocked a popup trying to warn you that your session is about to time out. Disable your popup blocker for this site so you can receive the warning popup next time.

App Pages

Example: home.aspx

The actual pages of the app that need a warning popup.

var oSessionTimeoutWarning = new SessionTimeoutWarning();

Warning Popup

Example: warning.html

The warning popup page that will give the user the ability to continue their session or will redirect all of their app tabs to the logout page.  This page needs to be an html page so that it does not affect the app’s actual session.

var oSessionTimeoutWarning = new SessionTimeoutWarning();

Continue Page

Example: continue.aspx

The continue page that resets their session clock.  This needs to be an app page that affects the app’s actual session so it gets reset.

<script language=”javascript”>