WebBrowserReset Function

Action

Emulates a Web browser restart. This function closes all persistent connections and clears the document cache, the document history, all persistent cookies, the authentication databases, and the SSL context cache of the user’s browser.

Include file

WebAPI.bdh

Syntax

WebBrowserReset( in nMode : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nMode

Specifies whether to complete reset the browser or to keep persistent cookies and the document cache (optional). This parameter must be one of the following values:

WEB_RESET_ALL
Emulates closing and opening the Web browser, and clears the document cache and the cookie database.
WEB_RESET_NONPERSIST
Emulates closing and opening the browser without clearing the document cache and deleting persistent cookies.

If this parameter is omitted, Silk Performer simulates the behavior specified in the Simulation tab of the Profile Settings - Web dialog.

Example

dcltrans
  transaction TInit
  begin
    WebSetUserBehavior(WEB_USERBEHAVIOR_REVISITING);
    WebSetDocumentCache(true, WEB_CACHE_CHECK_ALWAYS);
  end TInit;

  transaction TMain
  begin
    WebPageUrl("standardhost");
    WebBrowserReset(WEB_RESET_ALL);
    WebPageUrl("standardhost");
  end TMain;