Skip to main content
Version: 11.2

Client sessions

In previous versions, when the user had no server requests for a longer period of time, it could happen that the session on the server was timed-out. The next server request resulted in a nasty error message and the login page was thrown into place discarding all uncommitted manipulations that were made.

Although the functionality has changed, it is not fixed completely. What has been changed is that the application installs a timeout that logs out after a given period of time. By default this period is 15 minutes. This period, and what happens when it elapses, can be configured through the $.udb.setTimeout() function.

Example​

To shorten the idle-time to 10 minutes, while still logging out via the default $.udb.showLogin() behavior:

$.udb.setTimeout({ minutes: 10 });

It is possible to override the default function to show a warning dialog for a moment of time before showing the login. When the user responds to that dialog, a server request could reinstate the server session:

$.udb.setTimeout({
minutes: 10,
func: () => showSessionWarningDialog(),
});

The current settings can be queried, and the timeout can be reset to its defaults or switched off entirely:

$.udb.setTimeout('current'); // returns the options currently in effect
$.udb.setTimeout('reset'); // restores the default 15-minute timeout
$.udb.setTimeout('off'); // disables the timeout functionality