WebPageStatGetNextFrame Function

Action

Returns the next frame of a node (specified by its node ID). Use this function in combination with WebPageStatGetFirstFrame().

The return value is a node ID, which can be used in 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

WebPageStatGetNextFrame(
   in nNode  : number,
   in nFlags : number optional ): number;

Return value

  • 0 if there are no more frames

  • >0 otherwise

Parameter Description
nNode Node ID returned by a previous WebPageStatXXX function.
nFlags

Specifies the various options used by the search for the node. If this parameter is omitted the default options specified by the call to WebSetOption(WEB_OPT_DETAILED_PAGE_STAT) are used. Otherwise specify one of the following values:

PAGE_STAT_FLAG_NodeTypeLoad
Returns nodes that caused a request to be sent to the server (no cache hits and no suppressed documents).
PAGE_STAT_FLAG_NodeTypeCacheHit
Returns nodes that have been found in the cache (full cache hit), so that no request to the server is sent.
PAGE_STAT_FLAG_NodeTypeSuppress
Returns nodes for which no request has been sent to the server because they have been suppressed by the user (WebPageSuppress or WebSetDomainSuppress).
PAGE_STAT_FLAG_RedirChainOnlyLast
Returns the last node of a potential 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).

Example

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

  transaction TWeb
  var
    nNodeRoot : number;
    nNode     : number;
    fValue    : float;
    sUrl      : string;
  begin

    WebPageURL("http://lab3/");
    nNodeRoot := WebPageStatGetRootNode();
    if nNodeRoot > 0 then
      nNode := WebPageStatGetFirstFrame(nNodeRoot);
      while nNode > 0 do
        WebPageStatGetNodeInfo(null, sUrl);
        WebPageStatGetNodeData(STATFLAG_BytesSent, fValue);
        print("Url: " + sUrl);
        print("BytesSent: " + string(fValue));
        nNode := WebPageStatGetNextFrame(nNodeRoot);
      end;
    end;
  end TWeb;