title: Calculating Front end performance metrics via Web API's ( navigation API and performance timeline API)
body: <p>In order to calculate the first contentful paint , i used the below command in my browser console.</p>
  <p><code>window.performance.getEntriesByType('paint')</code> -&gt; From that , i fetched the start time of first contentful paint which is : startTime: 710.1449999972829 ms.</p>
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming#:%7E:text=The%20code%20above%20produces%20console,contentful%2Dpaint%20was%202787.460%20milliseconds." rel="nofollow noreferrer">Reference</a></p>
  <p>But if i audit the same page via lighthouse(from chrome dev tools), the first contentful paint calculated by lighthouse is '1.5 s'</p>
  <p>I am trying to understand why there is a wide difference between the two data. Tried running the audit couple of times via lighthouse, still the data hardy matches with web api data.</p>
  <p>Can anyone explain me as to why there is huge difference. Should i go ahead with the data from web api's or should i consider lighthouse data as valid one?</p>