Chrome 77 rolled out to Windows, Mac and Linux users this week and with it came a bunch of cool new features. While most of these are consumer facing, Google has also included some neat tricks beneath the hood specifically for developers. Chief among these are a pair of performance metrics that will help websites track and respond to sluggish page loads.
This will ultimately result in a more agile internet and faster browsing for everyone. Hurrah! Here are the details.
Chrome 77 allows website creators to monitor how quickly their content loads and is made visible to users. This is achieved through two new interfaces – Largest Contentful Paint and PerformanceEventTiming.
Largest Contentful Paint makes it easier to know when a page’s primary content has loaded. This is important, as web pages usually load in stages with the main elements given priority. As Google engineer Phil Walton explained in a blog post:
Sometimes simpler is better. Based on discussions in the W3C Web Performance Working Group and research done at Google, we’ve found that a more accurate way to measure when the main content of a page is loaded is to look at when the largest element was rendered.
PerformanceEventTiming, meanwhile, provides timing information about user interactions:
The PerformanceEventTiming interface provides timing information about the latency of the first discrete user interaction, specifically one of key down, mouse down, click, a pointer down followed by a pointer up. (Pointer down may be the start of scrolling, which is not tracked.) This is a subset of the EventTiming API, but will be exposed in advance because it provides key metrics to help measure and optimize responsiveness.
The upshot of all this is that developers will be able to track load times and user behaviour more effectively, and make adjustments to how their sites load when needed. Not bad, eh?
You can find out more about Chrome’s new dev tools and features in the Google video below.