For IAC 4.1, application developers asked how to perform a logoff from the IAC Gateway to prevent unused requestors from accumulating unnecessarily.
The applicatin developers referred to https://pdn.pega.com/internet-application-composer/gadget-manager-reference-for-internet-application-composer-iac#logoff.
The explanation for this behavior is as follows:
When using the pega.web.api.doAction(...) method, ensure that the script is within the same document, the DOM level, as the PegaInternetApplicationComposer.js file.
When calling the pega.web.api.doAction method for logoff using an unload window event, be sure to use the onBeforeUnload event.