If you're using
Date.now() to measure time, consider using
performance.now() provides a higher timestamp
resolution, and always increases at a constant rate that is independent
of the system clock, which can be adjusted or manually skewed.
In your report, Lighthouse lists every instance of
Date.now() that it
finds under URLs. Replace each of these calls with
performance.now() for more information on the API.
Lighthouse reports every instance of
Date.now() that it finds from
scripts that are on the same host as the page. Scripts from other hosts are
excluded, because Lighthouse assumes that you don't have control over these
scripts. So, there may be other scripts using
Date.now() on your page,
but these won't show up in your Lighthouse report.
Was this page helpful?