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
* Add a note about when to load the library
* Update README.md
Co-authored-by: Philip Walton <[email protected]>
Co-authored-by: Philip Walton <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,10 @@ The library supports all of the [Core Web Vitals](https://web.dev/vitals/#core-w
51
51
52
52
<aname="import-web-vitals-from-npm"><a>
53
53
54
+
The `web-vitals` library uses the `buffered` flag for [PerformanceObserver](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe), allowing it to access performance entries that occurred before the library was loaded.
55
+
56
+
This means you do not need to load this library early in order to get accurate performance data. In general, this library should be deferred until after other user-impacting code has loaded.
0 commit comments