WebSetBrowserSim Function

Action

This functions allows to adjust the advanced options for the browser simulation.

Allows the limitation of connections on a per server basis (e.g. 2 connections to one server, 4 connections to two servers). Additionally distinguishes between HTTP 1.0 and HTTP 1.1 connections. (By default the Internet Explorer uses 2 connections to every server connected with HTTP 1.1 and 4 connections to all other servers).

Allows to tune the retry strategy of the emulated browser, too.

Include file

WebAPI.bdh

Syntax

WebSetBrowserSim(
   in nOption : number allownull,
   in nValue  : number ) : boolean;

Return value

  • true if successful
  • false otherwise
Parameter Description
nOption

Specify any of the following values:

WEB_BROWSER_SIM_ConnHttp10
Specify the number of connection limit to every server using HTTP 1.0. Specify 0 to disable the connection emulation on the server basis.
WEB_BROWSER_SIM_ConnHttp11
Specify the number of connection limit to every server using HTTP 1.1. Specify 0 to disable the connection emulation on the server basi
WEB_BROWSER_SIM_ConnAll
Use this option to specify the unitary connection limit to every server, regardless if it uses HTTP 1.0 or HTTP 1.1.
WEB_BROWSER_SIM_MaxConn
Specify the absolute maximum number of connections, which the emulated browser opens. To perform an accurate connection simulation this value should be above the per server setting (above options).
WEB_BROWSER_SIM_RetryOnResetNoData
Specifies the number of request retries a browser performs, when the server does not respond at all, but resets the connection.
WEB_BROWSER_SIM_RetryOnResetInHeader
Specifies the number of request retries a browser performs, when the server resets the connections during receiving of the HTTP header.
WEB_BROWSER_SIM_RetryOnResetInBody
Specifies the number of request retries a browser performs, when the server resets the connections during receiving of the HTTP body.
WEB_BROWSER_SIM_RetryOnFinNoData
Specifies the number of request retries a browser performs, when the server does not respond at all, but closes the connection gracefully (Fin).
WEB_BROWSER_SIM_RetryOnFinInHeader
Specifies the number of request retries a browser performs, when the server closes the connections gracefully during receiving of the HTTP header.
WEB_BROWSER_SIM_RetryOnErrorNoData
Specifies the number of request retries a browser performs, when it encounters any error (besides connection closes) before the response of the server is received.
WEB_BROWSER_SIM_RetryOnErrorInHeader
Specifies the number of request retries a browser performs, when it encounters any error (besides connection closes) before the HTTP header has been received completely.
WEB_BROWSER_SIM_RetryOnErrorInBody
Specifies the number of request retries a browser performs, when it encounters any error (besides connection closes) before the HTTP body has been received completely.
nValue Specify the appropriate value. See nOptions for a description.

Example

dcltrans
transaction TInit
begin
   WebSetBrowserSim(WEB_BROWSER_SIM_ConnHttp10, 4);
   WebSetBrowserSim(WEB_BROWSER_SIM_ConnHttp11, 2);
   WebSetBrowserSim(WEB_BROWSER_SIM_MaxConn, 16);
   WebSetBrowserSim(WEB_BROWSER_SIM_RetryOnResetNoData, 5);
   end TInit;