WebSetBrowser Function

Action

Sets the browser type to be used for simulation. Different browsers send different header information to the Web server. For example, setting the browser to WEB_BROWSER_MSIE11 lets the low-level web functions use the preset headers for Microsoft Internet Explorer 11 simulation. The setting WEB_BROWSER_CUSTOM lets the functions use the custom-defined header strings of the workbench settings.

Note: This setting overrides previous browser settings in your script.

Include file

WebAPI.bdh

Syntax

WebSetBrowser( in nBrowser: number ): boolean;

Return value

  • true if successful

  • false otherwise

Example

dcltrans
  transaction TWebInit
  begin
    WebSetBrowser(WEB_BROWSER_CUSTOM);
    WebDumpSettings();
  end TWebInit;