GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.36k stars 105 forks source link

SPA sites - New Pages Metrics #63

Closed dwsmart closed 4 years ago

dwsmart commented 4 years ago

Describe the bug The first initial visit to an SPA site it fine, but if you go to a new page handled by an internal router (i.e. the page is hydrated without a reload) the subsequent page views stack up in the metrics, so you have a combined CLS of all page views, and seemingly the LCP & FID of the initial page.

To Reproduce Go to any SPA that works this way and click around, monitoring the figures.

Expected behavior It would be great if the route change could be detected and the metrics adjusted accordingly.

Version:

rviscomi commented 4 years ago

This is a limitation of the web platform primitives and unfortunately the extension can't do much if anything to alleviate it. The WebPerf WG is actively looking at ways to better measure use cases like SPAs.

dwsmart commented 4 years ago

Thank you for he feedback @rviscomi

Hopefully they will come up with something around this. Fingers crossed 🤞