The "DomInteractive" event and a browser metrics deep dive
- Published at
- Updated at
- Reading time
- 1min
There are plenty of DOM events and web performance metrics to consider when monitoring your site's user experience. There's Load
, the holy Speed Index or web vitals such as LCP
(largest contentful paint).
Harry just made a case for considering monitoring DomContentLoad
, too! It's a good piece on browser events and how to get your hands on improving web performance.
And while reading it, I discovered another browser event that I probably have known about but left my memory — DomInteractive
.
[DomInteractive
] is the moment the browser has finished parsing all synchronous DOM work: your HTML and all blocking scripts it encountered on the way. Basically, the browser is now at the </html> tag. The browser is ready to run your deferred JavaScript.
The DomInteractive
event can come in handy when evaluating your JS payloads' execution time. But I won't repeat Harry's insights here, so head over to his blog. The post is a nice deep dive!
Join 5.4k readers and learn something new every week with Web Weekly.