Today I Learned - Rocky Kev

TIL about the term Jank

POSTED ON:

TAGS:

Jank is a term that focuses on how a webpage is performing. It's not about the page load, but how smoothly the page renders.

Why does it work this way?

Most devices today refresh their screens 60 times a second. If there’s an animation or transition running, or the user is scrolling the pages, the browser needs to match the device’s refresh rate and put up 1 new picture, or frame, for each of those screen refreshes.
Each of those frames has a budget of just over 16ms (1 second / 60 = 16.66ms).
In reality, however, the browser has housekeeping work to do, so all of your work needs to be completed inside 10ms.
When you fail to meet this budget the frame rate drops, and the content judders on screen. This is often referred to as jank, and it negatively impacts the user's experience.
VIA https://developers.google.com/web/fundamentals/performance/rendering

Google actually has a metric for this called Cumulative Layout Shift, which gives you a score of when content keeps moving about even though the page looks like it's fully loaded.

Ideally, you'll apply some CLS optimizations to reduce/eliminate as much jask as possible.

REFERENCE:
Optimizing Web Core Vitals - Cumulative Layout Shift https://web.dev/optimize-cls/


Related TILs

Tagged:

TIL IndexNow

IndexNow is an open-source protocol that allows website publishers to instantly index across participating search engines, updating results based upon the latest content changes.

TIL lighthouse scores are simulations, not real world

So if you run Lighthouse on your high-powered developer machine and get great scores, that may not be reflective of what the users experience in the real world, and so what Google will use to measure your website user experience.

TIL using code-splitting to improve your First Contentful Paint (FCP) score

Code splitting is a technique where you send only the necessary modules to the user in the beginning.