The invention discloses a method based on rendering engine events for calculating the
initial screen time of a webpage. The method comprises the following steps of capturing a rendering event of the rendering engine of a browser through a special method, obtaining current state information of the webpage in the rendering event through a DOM (
document object model) method, if the webpage state is not smaller than a special state, proceeding to the next step, and if the webpage state is smaller than a special state, returning to capturing; obtaining a webpage actual height in the browser rendering events through the DOM method, if the webpage actual height is not smaller than the height of an
initial screen area, proceeding to the next step, and if the webpage actual height is smaller than the height of the
initial screen area, returning to the capturing; obtaining the range of a current rendering area in the rendering events of the browser, if the current rendering area is within an initial screen range, proceeding to the next step, and if the current rendering area is not within the initial screen range, returning to the capturing; and obtaining a screen image of the current webpage and judging whether the initial screen of the webpage is filled up, if not, continuing to monitor the rendering events of the rendering engine, and if so, recording the numerical value of the initial
screen time and stopping capturing the rendering events of the rendering engine of the browser.