Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Session Timeout - All windows are not closed



When multiple peripheral windows are opened by a session, on session timeout the main session window closes according to expectations, but peripheral windows (such as reports opened in pop-up windows) do not close automatically.

Error Messages

Not Applicable

Steps to Reproduce

  1. Open portal, which embedded pxsessionTimer section.
  2. Run any report, which opens the pop-up window.
  3. Configure a button to open harness as pop-up window.

Root Cause

PRPC does not close all child windows by default during log off.


​The PRPC User Interface layer tracks child windows. Perform the following local-change:
Use the JavaScript function given below to close all child windows when called:

function closeAllPRPCChildWindows()
   var currWin = null;
   var app =;
   while (null != (curWin = app.openedWindows.pop()))

Note: This code does requires a complete PRPC portal. This will not work with an Internet Application Composer implementation that displays a harness for example.

To include in logoff session timer code:

function desktop_showTimeoutLogoffDialogNew(strTime) {
    var iTime = parseInt(strTime);     iTime = iTime * 60000;
    var oSafeURL = new SafeURL("@baseclass.ShowLogoffTimer");
    pega.openUrlInModal.showModalDialog(oSafeURL,iTime, 210, 620, function(ret){    
        if (ret == null || ret == "ok") {
        } else {
            pega.u.d.gDirtyOverride = false;
            try {
            } catch(e) {
                pega.u.d.replace('pyActivity=LogOff&pzPrimaryPageName=pyDisplayHarness', null);
        self.setTimeout(function(){clearTimeout(pega.desktop.TimeoutWarningCountdown);}, 5000);

function closeAllPRPCChildWindows()
   var currWin = null;
   var app =;
   while (null != (curWin = app.openedWindows.pop())) {

Published August 5, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us