Introduction to Google Chrome’s New Feature
Google Chrome is testing a new way to measure Core Web Vitals in Single Page Applications (SPAs). This is a significant development because SPAs have been a blind spot in performance tracking, affecting SEO audits and ranking signals.
What are Core Web Vitals?
Core Web Vitals are metrics that measure the performance and user experience of a website. They include metrics like Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and Interaction to Next Paint (INP). These metrics are essential for website owners because they can impact the website’s search engine ranking.
The Problem with Single Page Applications
SPAs are popular for their speed and interactivity, but they have been difficult to monitor using traditional tools. This is because SPAs often update the page using JavaScript without triggering a traditional navigation. As a result, Google’s measurement systems and most performance tools miss those updates when calculating Core Web Vitals.
How the New API Works
The new Soft Navigations API uses built-in heuristics to detect when a soft navigation happens. For example, when a user clicks a link, the page URL updates, or the DOM visibly changes and triggers a paint. When these conditions are met, Chrome treats it as a navigation event for performance measurement, even though no full page load occurred.
New Metrics and Enhancements
The API introduces new metrics and enhancements, including:
- interaction-contentful-paint – measures Largest Contentful Paint after a soft navigation
- navigationId – added to performance entries so metrics can be tied to specific navigations
- Extensions to layout shift, event timing, and INP to work across soft navigations
Trying Out the New Feature
Developers can test this feature today in Chrome 139 using either local testing or an origin trial. To try it out, enable the chrome://flags/#soft-navigation-heuristics flag or add a token to your site via meta tag or HTTP header to collect real user data.
Things to Keep in Mind
The Soft Navigations API is still experimental, and metrics may not be supported in older Chrome versions or other browsers. Additionally, some edge cases, like automatic redirects or replaceState() usage, may not register as navigations.
Looking Ahead
This trial is a step toward making Core Web Vitals more accurate for modern JavaScript-heavy websites. If the trial proves successful, the API could be integrated into Chrome’s public performance reports like CrUX. This would provide website owners with a more accurate picture of their website’s performance and user experience.
Conclusion
Google Chrome’s new Soft Navigations API is a significant development for website owners who use Single Page Applications. The API provides a more accurate way to measure Core Web Vitals, which can impact a website’s search engine ranking. By trying out the new feature and providing feedback, developers can help shape the future of web performance measurement.