Advancement core Web vitals and SPA ?

108 views
Skip to first unread message

Alexandre Joffre

unread,
Jun 22, 2023, 11:58:36 AM6/22/23
to web-vitals-feedback
Hello
From what I understand, to date we have no reliable Core Web Vitals indicator to measure performance on a SPA site and even less to compare it to an MPA site.

The INP seems the most relevant. Do you agree with this approach? Is there an improvement agenda for taking LCP into account for a SPA application?

THANKS,
Alexander

Michal Mocny

unread,
Jun 22, 2023, 12:27:36 PM6/22/23
to Alexandre Joffre, web-vitals-feedback
Indeed, the Chrome User Experience (CrUX) report, does not currently measure SPA navigations (no new LCP), nor does it slice full page lifecycle metrics (like INP or CLS) on SPA routes.  (Thus, neither does pagespeed insights etc)

However, the performance data that powers those metrics are exposed to the web via Performance APIs such that you are able to gather your own field data.  So, if it is important for you to understand your field metrics and you are already collecting this via some RUM data provider (or rolling your own simple collection, perhaps using web-vitals.js) -- it is possible, perhaps even relatively easy, to slice on SPA routes yourself.

There are several projects underway to do what you ask for: automatic soft-navigation detection, LCP events post soft-navigation, and INP/CLS slicing based on route change.  I would not expect such data to be available to CrUX in any predictable time frame, however, you can test these features in Chrome, either locally just by enabling experimental-web-platform features, or in the field via Origin Trial on Chrome right now (ending very soon, perhaps will be extended...).

Cheers!

--
You received this message because you are subscribed to the Google Groups "web-vitals-feedback" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-vitals-feed...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web-vitals-feedback/3de01b41-cc7e-4bb1-8f24-fb2f7c8b4ed5n%40googlegroups.com.

Barry Pollard

unread,
Jun 22, 2023, 12:56:29 PM6/22/23
to Michal Mocny, Alexandre Joffre, web-vitals-feedback
Yes the Soft Navs origin trail is being extended btw. We really value feedback on that if we want to make progress on solving this issue.
Feedback can be submitted by raising bugs at https://crbug.com/new or issues for discussion here: https://github.com/WICG/soft-navigations/issues.

Ravi Roshan

unread,
Sep 1, 2023, 3:13:39 AM9/1/23
to web-vitals-feedback
Hi Team,

I was going through this section on web.dev which covers unfair advantage of MPA over SPA. Two potential solutions are mentioned and one of those is "Design new APIs that enable better SPA measurement (Long Term solution)" and more details for experiments were added for that here. It seems like this experiment was concluded with the outcome "CrUX will continue to report the metrics in the existing manner regardless of this soft navigation setting so is not impacted by those implications".

Could you also provide some details & timeline on the progress of proposed short term solution "Assess cross-origin and same-origin page visits separately." and how will it impact CrUX data?

Barry Pollard

unread,
Sep 1, 2023, 3:29:17 AM9/1/23
to Ravi Roshan, web-vitals-feedback
As noted in that experimentation article:

The Soft Navigations origin trial has now ended. The Chrome team are taking onboard the feedback received and will be making some adjustments and are aiming to relaunch a second origin trial from Chrome 117 (due for release in September 2023) for further feedback.

So, looking to relaunch this second origin trial in the next month.

We are still looking for further feedback on the origin trials before any further decisions are made.

Barry

Ravi Roshan

unread,
Sep 1, 2023, 1:44:37 PM9/1/23
to web-vitals-feedback
Thank you for the prompt response Barry. If I understand this correctly, below is the current status on these initiatives (please confirm)

  1. "Design new APIs that enable better SPA measurement (Long Term solution)" : Trial has ended, and will be restarting it next month.
  2. "Assess cross-origin and same-origin page visits separately (Short Term solution) : No change/progress on this yet and no impact on CrUX data from this initiative .

Barry Pollard

unread,
Sep 4, 2023, 10:17:07 AM9/4/23
to Ravi Roshan, web-vitals-feedback
Yes, that is correct. At present we are concentrating our efforts on being able to better measure SPA navigations and I'm not aware of any plans to treat cross-origin and same-origin page views differently (though this was looked into at the time of that post's publication).



Reply all
Reply to author
Forward
0 new messages