How to improve or pass core web vitals?

There are several ways to improve core web vitals:

  1. Compress image size and reducing the number of requests.
  2. Use Content Delivery Network (CDN) to distribute resources and reduce the load time for users who view the web page from different geographic locations.
  3. Use browser caching to store resources locally on users devices, reducing the number of requests required to load a page.
  4. Implement lazy loading to delay the loading of resources that are not immediately visible on the screen, such as images below the fold.
  5. Minimize JavaScript and CSS, break them into smaller chunks, and load them asynchronously, to reduce the time to first paint and the time to interactive.
  6. Identify and fix any layout shifts, by using CSS Grid and Flexbox, or using size and aspect ratio properties to prevent reflow.
  7. Avoid using heavy libraries or frameworks.
  8. Make sure that your web server is configured for optimal performance and that you are using the latest version of your web server software.
  9. Consider using preconnect, preload or prefetch to improve loading time of the critical resources.

    You can use tools like PageSpeed Insights, Lighthouse, and web.dev to measure your web vitals and get suggestions for improvements.

Related Questions