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!
Yes? Cool! You might want to check out Web Weekly for more WebDev shenanigans. The last edition went out 12 days ago.
Related Topics
Related Articles
- Should responsive images work with container queries?
- How to find all render-blocking resources with JavaScript
- Safari only supports image formats macOS/iOS support, and that's good for some users
- A picture element to load correctly resized webp images in HTML
- slowfil.es – a service for slow assets with high priority