Skip to content

domContentLoaded vs. window.chrome.loadTimes().firstPaintTime  #40

Description

@jonascript

Hi,
First just want to say I really like this plugin and find it useful. It gives really easy access to important metrics.

I'm trying to investigate critical rendering and I was wondering how firstPaintTime compares to domContentLoaded and why you are using firstPaintTime and domContentComplete, but not domContentLoaded.

Does firstPaintTime actually match critical render or is just when something happens when anything starts to be painted on the screen? I've tried to find some docs on firstPaintTime but can't find anything specific and what it indicates.

On google's page regarding critical rendering time, it doesn't reference the paint time.
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/measure-crp?hl=en

For example, what would be the difference between what these two indicate?

1:
((window.chrome.loadTimes().firstPaintTime * 1000) - (window.chrome.loadTimes().startLoadTime*1000)).toFixed(0);

2:
(window.performance.timing.domContentLoadedEventStart - window.performance.timing.domLoading)

Do you know which one of these would be closer to critical rendering time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions