ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / WEBDEV specific features
  • Overview
  • How to?
  • Defining an automatic data refresh
  • Use conditions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
From version 26, this feature is kept for backward compatibility.

Browsers do not always support Server-sent events (SSE).
This feature can still be used if you master the browsers used, in a secure intranet for example, and if it suits the needs of the site.
In the case of a public site, timer browsers should be used.
Overview
In a dynamic WEBDEV site, the page data is refreshed during a user action.
In some cases, it may be necessary to refresh some information found in this page, without any user intervention: for example, a counter of incoming emails or a stock level. Multiple methods are available:
  • Use a browser timer to refresh the page or call a server procedure in Ajax.
  • Use the option for automatic refresh of the page. This mechanism is based on the "Server-sent events" technology (SSE). This technology allows the session (server side) to initiate the transmission of data toward the browser once the initial connection is implemented.
How to?

Defining an automatic data refresh

To define an automatic data refresh in a page:
  1. Open the desired page in the page editor.
  2. Open the page description window: on the "Page" tab, in the "Description" group, click "Description".
  3. In the "General" tab, check "Update data from server to browser every " and specify the refresh period (in seconds).
  4. Validate.
  5. Display the events associated with the page (F2 on the page for example).
  6. Two new events are available:
    • Refreshing the page data (server code): This event is run when the page is refreshed. It is used for example to refresh the desired controls: filling a list, ... This is an Ajax event.
    • After refreshing the page data (browser code): This event is run after the event "Refreshing the page data (server code)". It is used to perform an additional process on the browser.
    Remark: If the even"Refreshing the page data (server code)" returns True (RESULT True), the browser code is run (default case). Otherwise, the browser code will not be run.
Caution: In order for the refresh code to be run, the specified refresh period must be less than the timeout for site lifetime.
Reminder: The lifetime of the session corresponds to the parameter "Disconnect the idle users since..." specified in the administrator of the WEBDEV application server ("Configuration" tab).

Use conditions

This option is available for the dynamic WEBDEV sites developed in HTML5 and operating on the following types of browsers:
  • Google Chrome: All versions
  • Mozilla Firefox: From Firefox 6.0
  • Opera: From Opera 11
  • Safari: From Safari 5.0
  • Internet Explorer: Not supported (including IE 11)
  • Edge: Not supported
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help