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”>

Leave a comment


  1. buyan

     /  June 13, 2013

    HI Kyle,
    I tried using this timer on a visual force page on a site and i ran into a lot of issues. Could you help me if i can give you a quick call?

  2. HI Kyle, I was able to use your technique in our existing timeout module and it’s working swimmingly.

  3. anil

     /  August 23, 2014

    timer is not showing in title part , In chrome & firefox

  4. Sri

     /  January 20, 2015

    hi kyle
    i tried downloading the js file but cant download it can you mail me the session timeout js to the following email

  5. Great article and code; also working as expected.
    I will be using this…

  6. Priya

     /  February 28, 2016

    Hi Kyle,I tried downloading the js file but cant download the same, would it possible for you to email the same to the following email? Thanks!

  7. Kavya

     /  March 18, 2016

    Hi Kyle,

    i tried downloading the js file but can’t download it.. Can you mail me the session timeout js to the following email.


  8. Saravana

     /  March 1, 2017

    Hi Kyle,

    I am not able to access the video/download link and getting 404. Can you please send it to me in mail?



Leave a Reply to Sri Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: