Measuring network performance with Resource Timing API
Blog post from Google Cloud
Network performance is crucial for delivering a fast and responsive user experience, with the goal of loading pages in under one second. The W3C Navigation Timing API provides tools to measure critical milestones for the main HTML document, but the Resource Timing API extends this capability to all page resources, such as CSS, JavaScript, and images, by offering high-resolution timestamps for each resource. This API allows developers to track and optimize the performance of each resource, even those from third-party servers, which require an additional HTTP header for detailed data access. Many third-party assets, including Facebook and Disqus widgets, Google+ plugins, and Google Hosted Libraries, can now be monitored using the Resource Timing API. This data can be further analyzed by sending it to analytics servers to generate detailed performance reports and set SLAs. Despite long cache lifetimes potentially delaying access to timing data, the Resource Timing API is a significant enhancement to the web platform, enabling performance optimization through measurement.