javascript - Difference between timeDone in RT plugin in boomerang vc navigation timing page load time -


i use boomerang.js monitoring web site performance real users site. http://lognormal.github.io/boomerang/doc/

it has rtplugin http://lognormal.github.io/boomerang/doc/api/rt.html measures timedone (perceived page load time ).

there navigationg timing api boomerang supports browsers support navigation timing. using navigation timing can calculate page load time using:

totaltime = loadeventend - navigationstart

https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/navigationtiming/overview.html#processing-model

totaltime , timedone different numbers when @ data more closely , timedone more totaltime

my questions are

  1. which 1 of 2 right metric finding out when page loaded ?
  2. what rt plugin more navigation timing captures ?
  3. when should use metric , why ?

thanks kunal

good see here :)

which number correct depends on you're measuring. if you're measuring when onload fires , let boomerang fire event on own, 2 numbers same since tdone uses same math mentioned above. see code in done() method:

if(impl.navigationstart) {     t_start = impl.navigationstart; } 

(https://github.com/lognormal/boomerang/blob/master/plugins/rt.js#l368)

impl.navigationstart equal window.performance.navigationstart except in cases when browser bug results in navigationstart being wrong or non-existent. in cases boomerang falls other values (see source more details).

the end time time when done() method called. default called in page's onload method, can override this.

many sites have pages considered "complete" (user usable) before onload event fires, may want call boomerang's boomr.page_ready method @ time.

similarly, sites load of content after onload, , may wait until time call page_ready.

the last case when page prerendered google chrome. in case onload event fires, page not usable user. wait until page moves prerender state visible state before capturing time (and in case capture transitions).

hope answers question.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -