ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Page / Back button
  • Overview
  • Operating mode
  • Remarks
  • Implementation
  • Disabling the browser "Back" button for a specific page
  • Disabling the browser "Back" button for a frameset
  • Disabling the browser "Back" button for all the project pages
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
Preventing the use of the browser's "Back" button
Overview
If the browser "Back" button is used to display the previous page, this action will have no effect.
Operating mode
Disabling the "Previous page" feature of the browser inserts the following JavaScript code into the generated HTML page:
<SCRIPT LANGUAGE="JavaScript">
history.forward()
</SCRIPT>
When running the page in a browser, it will not be possible to go back to this page by using the "Back" button.

Remarks

  • This action will have no effect.
  • Clicking the browser "Back" button can make the page blink.
  • This mechanism can fail if the browser [STOP] button is clicked before the forward() statement is run by the browser.
Implementation

Disabling the browser "Back" button for a specific page

To disable the browser "Back" button for a specific page:
  1. Open the "UI" tab of the page description window ( "Description" option in the page context menu).
  2. In the "Options" area, for the option "Browser "Back" button", select "Forbidden".
  3. Validate.

Disabling the browser "Back" button for a frameset

To disable the browser "Back" button for a frameset:
  1. Open the "UI" tab of the frameset description window ( "Description" option in the frame context menu).
  2. In the "Options" area, for the option "Browser "Back" button", select "Forbidden".
  3. Validate.

Disabling the browser "Back" button for all the project pages

To disable the browser "Back" button for all project pages:
  1. Open the project description: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "Advanced" tab, for the option "Default option for the browser "Back" button", check "Forbidden".
  3. Validate. This option will be automatically taken into account for all new site pages.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help