You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of the current web-vitals version (2.0.1), the getCLS() function will not report (by default) unless the page's visibilityState is hidden.
This fits with our developer guidance, which has long been to use visibilitychange as a session-ending signal and the last reliable Page Lifecycle event.
If all you care about is monitoring CLS, then Safari bugs are not an issue because Safari does not support the Layout Instability API. However, you're using the web-vitals JS library as part of more comprehensive, cross-browser RUM implementation that batches multiple events together to send when the user is about to leave a page, this library fires the getCLS() callback too late.
To better accommodate batch reporting, this library should fire the getCLS() callback in the pagehide event (in addition to the visibilitychange event).
The text was updated successfully, but these errors were encountered:
As of the current web-vitals version (2.0.1), the
getCLS()
function will not report (by default) unless the page's visibilityState is hidden.This fits with our developer guidance, which has long been to use
visibilitychange
as a session-ending signal and the last reliable Page Lifecycle event.What complicates this guidance, though, is due to browser bugs with Page Visibility in Safari the are many cases where developers still need to listen for the
pagehide
event in addition to thevisibilitychange
event.If all you care about is monitoring CLS, then Safari bugs are not an issue because Safari does not support the Layout Instability API. However, you're using the
web-vitals
JS library as part of more comprehensive, cross-browser RUM implementation that batches multiple events together to send when the user is about to leave a page, this library fires thegetCLS()
callback too late.To better accommodate batch reporting, this library should fire the
getCLS()
callback in thepagehide
event (in addition to thevisibilitychange
event).The text was updated successfully, but these errors were encountered: