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 2888

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

Author
  • 61k
Author
Asked: November 26, 20242024-11-26T09:36:11+00:00 2024-11-26T09:36:11+00:00

Watching your Core Web Vitals on Jamstack

  • 61k

Whether we notice it or not, we’re all living and working in a Core Web Vitals world. Three major metrics — Largest Contentful Paint, First Input Delay, and Cumulative Layout Shift — measure a site’s loading time, time to interactivity, and visual stability, as we’ll examine in this article. Further, we’ll cover why it’s important to consider your site’s core vitals both as you build it, and as you maintain it. Luckily for you, Jamstack sites (including those created with CloudCannon) are perfectly placed to achieve high scores, so you’re already leagues ahead of a developer working with a monolithic CMS.

What are Core Web Vitals?

At their core, the web vitals measure overall user experience. But before we discuss how to leverage and improve these three metrics, let’s dig in to what they’re measuring.

1. Largest Contentful Paint (LCP)

LCP measures how long it takes to load the largest piece of content on your page. To reach your LCP score, Google calculates the render time of that largest image, video, or text block on your page, relative to when that page first began its load process. In terms of direct user experience, your LCP measures how long a user has to wait to see that block.

Aim for: <=2.5ms LCP

2. First Input Delay (FID)

FID measures the time from when a user first interacts with a page to the time when the browser actually responds to that interaction. Obviously this metric is particularly important on pages where you want or need a user to do something — to click a link, submit a form, or open a modal —because that’s the point at which the page has to be interactive.

Aim for: <=100ms FID

3. Cumulative Layout Shift (CLS)

CLS measures the total of all unexpected layout shifts that occur during the lifespan of the page. This score can range from zero to any positive number, where zero means no shifting.

Aim for: <=0.1

Measuring Core Web Vitals

Before we move on, take a moment to run a quick test on one of your sites. You’ll see that your site pages are given an aggregate score based on the results for 75% of pages within a URL group. Google’s assumption here is that performance issues in similar pages are likely due to the same underlying problem.

Lighthouse tests are a helpful method to measure your web vitals — you can run Lighthouse tests from Chrome DevTools, via the Lighthouse Chrome Extension, or in the command line:

npm install -g lighthouse 
Enter fullscreen mode Exit fullscreen mode

To run your test:

lighthouse  
Enter fullscreen mode Exit fullscreen mode

If you need more information, try:

lighthouse --help 
Enter fullscreen mode Exit fullscreen mode

You can also use Lighthouse programmatically, as a Node module.

How to improve your Core Web Vitals

Core Web Vitals can be improved in many ways, though it’s always more effective to begin on any areas that are scoring the lowest. You should start from the infrastructure you’re hosting on, before moving on to the way your site is built, and making small tweaks like resizing individual images.

Start with these high impact methods to improve your Core Web Vitals on your static sites:

  • Use a CDN to deploy on the edge. See CloudCannon’s Jamstack hosting performance comparison. 
  • Remove unnecessary JavaScript. Static site generators like Astro and SvelteKit (both supported by CloudCannon) are great solutions here, as they give both the speed of static and dynamic interactions of an SPA.
  • Minify your CSS, JS, and HTML where possible. Again, your chosen build tools will help you here — Sass allows style: compressed, for example, and something like jekyll-minifier could be a solid turnkey option for Jekyll users to minify HTML, XML, CSS, JSON, and JavaScript.
  • Reduce the number of redirects you use by planning ahead. It’s really tempting to take the path of least resistance and use redirects when you change a site layout, but if you begin your build process with a clear plan for navigation, you will greatly reduce the need to redirect in the first place.
  • Serve optimized images and videos that only load when they’re needed. Formats like AVIF and WebP images are generally better optimized than legacy image formats — though depending on the image you’re serving, in some cases a PNG or SVG might be ideal. Further, lazy loading is a simple change to add into your workflow.

It’s worth keeping in mind that because Core Web Vitals reflect metrics for the past 28 days, any changes you make now will take at least four weeks to be reflected in Google’s report. So there’s never a better time than now to make a change — even a small one!

beginnersjamstackstaticwebdev
  • 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.