Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs should mention "when to load" #304

Closed
kurtextrem opened this issue Jan 11, 2023 · 3 comments · Fixed by #305
Closed

Docs should mention "when to load" #304

kurtextrem opened this issue Jan 11, 2023 · 3 comments · Fixed by #305

Comments

@kurtextrem
Copy link

kurtextrem commented Jan 11, 2023

To some it might be obvious, but the readme does not mention when to load the library. It mentions install, it mentions how to use (the methods of the lib), integrations in other stuff, but not "when to load".

Only in this Codelab it is mentioned

Copy this module script, and paste it just before the closing </body> tag.

Not everyone reads this Codelab, and I also don't think everyone using the web-vitals knows what to do best.
Questions like:

  • "Can/Should I lazy load the lib?"
  • "Do I need to load it as early as possible to not miss any values?"
  • "Do I register the callbacks on DOMContentLoaded/onLoad/using requestIdleCallback?"

are open questions I can think of in the environment of performance, because there is no guideline.

@tunetheweb
Copy link
Member

Have a look at the wording in #305 and let me know if that is clear enough.

@kurtextrem
Copy link
Author

To me yes. Thank you!

@tunetheweb
Copy link
Member

Closed with #305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants