WebPageStatGetNextReload Function

Action

Returns the subsequent node in a redirection chain. A redirection chain is created when a request is retried or reissued because of a redirection or an authentication request by the server.

The return value is a node ID, which can be used in various other WebPageStatXXX calls.

To generally enable extended page statistics functionality, call WebSetOption with an option of WEB_OPT_DETAILED_PAGE_STAT (for a detailed description of the various values see WebSetOption).

Include file

WebAPI.bdh

Syntax

WebPageStatGetNextReload( in nNode: number optional ): number;

Return value

  • 0 if there is no redirection chain or the provided node is the last node in the chain.

  • >0 otherwise

Parameter Description
nNode Node ID returned by a previous WebPageStatXXX function. When this parameter is omitted, the most recently returned node ID is used.

Example

dcltrans
  transaction TInit
  begin
    WebSetOption(WEB_OPT_DETAILED_PAGE_STAT,
                 PAGE_STAT_FLAG_AllLoadedNodes);
  end TInit;

  transaction TWeb
  var
    nNode       : number;
    nNodeReload : number;
    fValue      : float;
    sUrl        : string;
  begin
    WebPageUrl("http://lab3/");
    nNode := WebPageStatGetRootNode();
    if nNode > 0 then
      nNodeReload := WebPageStatGetNextReload();
      if nNodeReload > 0 then
        WebPageStatGetNodeInfo(null, sUrl);
        print("Reload Url: " + sUrl);
        nNode := nNodeReload;
      end;

      if WebPageStatGetFirstFrame(nNode) > 0 then
        WebPageStatGetNodeData(STATFLAG_BytesSent, fValue);
        print("BytesSent: " + string(fValue));
      end;
    end;
  end TWeb;