Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 5148

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 61k
Author
Asked: November 27, 20242024-11-27T06:34:08+00:00 2024-11-27T06:34:08+00:00

Getting to Know Web Vitals!

  • 61k

What are Web Vitals?

In a recent project, my NextJS with Material UI deployment has been loading the initial render slow. So I am learning the debugging process behind that performance lag, which has me getting to know the Web Vitals a bit better. And I thought I'd share what I've learned thus far with you.

I can gain access to the Web Vitals in a few different places, but currently I just want the value output so I'm using the reportWebVitals function that is inherit in NextJS and logging them out for quick access, for more detail and suggestions I can run a Lighthouse report.

Lighthouse Performance Report, reading a score of 97 for Ren Estep dot com

Web Vitals

In the simplest terms, Web vitals are useful metrics that help in the examination of the user experience of a webpage. They are an initiative from Google, that hope to simplify and help focus evaluations to what matters most, these culminate into the Core Web Values.

So what are the Core Web Values?

A subset of web vitals that can be applied to all web pages, should be examined and weight by site owners, and have a thread to all the Google tools. The subsets, each has a reference to a specific type of user experience. These references provide measurements and can reflect critical user-centric outcomes.

The Core Web Vitals:

  • LCP: Largest Contentful Paint
  • FID: First Input Delay
  • CLS: Cumulative Layout Shift

The metrics listed above are used in measuring important performance elements of user experience, when interacting with a webpage. If you were running a Lighthouse report, the thresholds that are reflected for each metric helps define the performance score for the webpage you're reviewing. Below the Core Web Vitals are expanded upon, along with other metrics that are available through the reportWebVitals, which include Web Vitals and NextJS specific metrics.

The Web Vitals metrics I have access to through the reportWebVitals method:

  • TTFB: Time To First Byte

    • This metric refers to the time it takes to receive the first byte of information after the browser request it.
  • FCP: First Contentful Paint

    • The metric reflect the time to the first bit of content rendered to the DOM.
    • This is where a user can start consuming page content.
  • LCP: Largest Contentful Paint

    • This metrics measures loading performance, for “Good UX”, loading should take between 0 and 2.5 seconds.
    • Using the reportWebVitals, the value is represented in milliseconds
  • FID: First Input Delay

    • A metric for measuring Load responsiveness, when this number is low the site is typically easier to use and navigate.
    • The perception of the end user's experience while interacting with the web page.
    • It help measure the time from when the user first interacts with the page to the time when the browser processes the interaction.
    • For “Good UX”, that time should fall between 0 and 100 milliseconds
  • CLS: Cumulative Layout Shift

    • A metric for measuring visual stability.
    • This measures the largest burst of layout shifts that are unexpected through out the life of a page.

Additional NextJS Specific Metrics:

  • Next.js-hydration

    • This measures the length of time from start to finish, it takes a page to Hydrate in milliseconds.
    • What is Hydration?
    • The process of attaching react listeners to HTML-DOM nodes.
    • Rehydration is basically the same, but in reference to Server Side Rendered(SSR) rendered HTML. The listeners still need to be attached.
  • Next.js-route-change-to-render

    • How long it takes a page to start rendering after a route change.
    • It is measured in Milliseconds.
  • Next.js-render

    • How long it takes a page to finish rendering after a route change.
    • It is measured in Milliseconds.

Thoughts on improving the Core Web Values

  • LCP: Largest Contentful Paint

    • Remove unnecessary 3rd part scripts
    • Set up Lazy or Dynamic loading, Loading components only when they are needed
    • Remove large page elements
    • Minify your CSS
    • Upgrade your hosting
  • FID: First Input Delay

    • Minimize JavaScript, page interactions are slowed down if the page is loading javascript.
    • Remove any unnecessary 3rd party scripts
    • Use a browser caching
  • CLS: Cumulative Layout Shift

    • Set size attributes for any medias types
    • Ads should have reserved space, placeholders
    • Adding new UI elements should happen in a way that they don't unexpectedly push content down or over.
    • Avoid content shifting around the page.
    • Dynamically/ lazy load components

I'm in the process of testing out different solutions, for my larger numbers. I'm looking at rendering a static page initially, fingers crossed it's the first solution (we all know it never is)! It's been a joy learning as new development opportunities that have come with bigger responsibilities. I hope my notes help on your learning path as well.

Resources

  • Web.dev Web Vitals
  • BACKLINKO User Experience Signals: Core Web Vitals
  • NextJS Web Vitals
  • NextJs Learn: Improving Your Core Web Vitals

beginnerscorewebvitalsnextjswebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.