AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones varias de WEBDEV
  • Principle
  • Notes
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
SessionHeartBeatEnable (Function)
Enables or disables the "heartbeat" of the current session.
Note: By default, the heartbeat of the current session is 5 minutes.
Ejemplo
SessionHeartBeatEnable(True, 10 min)
Sintaxis
SessionHeartBeatEnable(<Enabled> [, <Interval>])
<Enabled>: Boolean
  • True to enable the heartbeat,
  • False to disable it.
<Interval>: Optional duration or string
Interval between two calls. This parameter can correspond to:
  • a Duration variable,
  • the duration in a readable format (e.g., 5min).
The default interval is 5 minutes (unless the session timeout is shorter).
Note: WEBDEV Application Server always waits 1 minute, regardless of the configured interval. Therefore, this minute is always added to the interval specified by the parameter.
Observaciones

Principle

The purpose of the session heartbeat is to reduce server load by closing sessions earlier (for example, by detecting sessions where the user is offsite).
The HeartBeat feature is an automatic process on the browser that regularly sends information to the server (e.g. every 5 minutes) to indicate that the browser is open. Once the user has closed the browser, the server no longer receives this HeartBeat and can therefore close the session immediately, without waiting for the timeout.
Attention HeartBeat does not extend the session beyond the user's inactivity timeout (defined in the WEBDEV Application Server). If you set a session timeout to 10 minutes, the session will be closed after 10 minutes without an action from the user, even if the browser is still open.
Therefore, choosing the right interval is essential:
  • If the interval is too big, sessions remain open for too long.
  • If the interval is too short, the server is unnecessarily loaded with heartbeat calls to keep the sessions alive.
Warning: these "beat" calls consume resources (network and battery) in the case of mobile clients.
WEBDEV Application Server tries to dynamically detect whether the session can be maintained. Sessions are terminated early only if the application server detects that the page displayed by the client is a complete page of the site.. In the opposite case (the response is a generated image, a buffer, or the display of an external page, such as a payment page), early session termination is deactivated, until the next request for the session that returns a complete site page.

Notes

  • The call to SessionHeartBeatEnable is taken into account from the next page returned by the WEBDEV Application Server.
  • If the configuration is to be applied to all pages of a site, SessionHeartBeatEnable must be called in the initialization code of the project, or of the first page (or any code called before the first page is returned).
  • SessionHeartBeatEnable also enables the heartbeat in test mode (project or page test via "Go"). It is usually ignored because the test mode detects the browser is closed and the session is immediately terminated.
Componente: wd300page.dll
Versión mínima requerida
  • Versión 26
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local