Performance Metrics - WebPerf#0

Search for a command to run...

No comments yet. Be the first to comment.
A few months ago, I was frustrated with JavaScript. No matter how many tutorials I watched or articles I read, I couldn’t fully grasp its concepts. Asynchronous programming felt like a mystery, closures confused me, and debugging code felt like an en...
What is React Hooks? Hooks are functions that let you use the React state and lifecycle events in a functional component. Hooks won't work inside classes. They came into existence to solve many problems created by the class-based components. In class...

You must have visited a lot of websites in your lifetime. And the user experience on the site is

Good site performance is sometimes vital for a good user experience (UX). But what is performance, how can it be measured, and how can it be improved?
Web Vitals are the parameters on which a Site’s Performance is measured. Just like in a human body we have vitals like Blood Pressure, Pulse Rate, etc which are essential to know about the performance of a person, we have parameters like Largest Contentful Paint, First Contentful Paint, Cumulative Layout Shift, First Input Delay, etc to measure a website’s performance.
Core Web Vitals are the subset of Web Vitals that apply to all web pages. The three Core Web Vitals are:
These core web vitals are based on the three main aspects of user experience: Loading, Interactivity, and Visual Stability
We will be learning these in very detail so here is a brief on them
It is the time taken by the site to load the largest image or text block visible within the viewport of a site.

It is the time from when a user first interacts with a page (i.e. click a link, tap on a button) to the time when the site is able to begin processing event handlers in response to that interaction.
You might have seen in some sites that the banner or the navbar is not rendered in the first go and is rendered afterward which causes the components below it to shift. CLS is a measure of that layout shift.
They can be measured by a variety of tools. Some of the most popular ones are:

This is the measurement of my portfolio site. swapandeep.com
For more awesome JS or WebDev related blogs check out my profile
LinkedIn My Portfolio Twitter Instagram
Image credits: web.dev