Google has updated its popular Chrome browser with new and updated APIs for developers to improve the experience for all users.
Currently available in the beta channel, Chrome 60 includes a brand new Paint Timing API, enhancements to the Credential Management API, and improvements as to how pages are rendered with a new CSS Font-Display feature.
Paint Timing API
The Paint Timing API is designed to help web developers gauge how quickly a web app or page loads to help make improvements where necessary. This is measured with two metrics – First Paint, and First Contentful Paint.
Both measure how fast content renders, but have two key differences:
First Paint only marks when all the content is loaded on the display.
First Contentful Paint marks when useful content is loaded on the screen.
Credential Management API
This existing API has been improved so developers no longer need to use the Fetch API to create a custom ‘fetch’ to access passwords stored by the browser. Web pages can now retrieve the passwords directly using the Credential Management API which reduces the complexity of building a web page or app which requires stored passwords to be retrieved.
CSS Font-Display is a new feature in this Chrome release which improves the experience for all users of the browser. Whereas in the past when a website uses a unique font it would take longer for a page to be rendered due to the delay while the font is downloaded; now web developers can specify ‘font face descriptors’ which dictate how to temporarily render text in the meantime.