01.Largest Contentful Paint (LCP): Sub-1.2s Target
LCP measures perceived load speed by tracking when the main above-the-fold content element (typically a hero image or large title) finishes rendering.
- • Always preload the hero image with high priority (
fetchpriority="high"in HTML orpriorityin Next.js Image). - • Serve assets in AVIF or WebP format rather than raw PNG/JPEG.
- • Host fonts locally or via zero-CLS self-hosted subsets (like
next/font).
02.Interaction to Next Paint (INP): Silky Responsiveness
INP measures how quickly a page responds visually to user actions. If clicking a button blocks the main JavaScript thread for more than 200ms while running expensive calculations, users perceive the app as frozen or janky.
To optimize INP, break long tasks using requestIdleCallback() or React 19’s useTransition(), ensuring high-priority user input updates the screen instantly while background filtering runs non-blockingly.
03.Cumulative Layout Shift (CLS): Zero Jitter
Nothing frustrates a reader more than text jumping down as an image, ad banner, or cookie notice pops in unexpectedly. Always reserve explicit aspect-ratio containers (aspect-video, min-h-[250px]) for dynamic elements, third-party ads, and images.
Frequently Asked Questions
How do GSAP animations affect Core Web Vitals?
When using GPU-accelerated transforms (transform: translate3d / scale and opacity), GSAP runs on the compositor thread with zero layout thrashing, preserving 100/100 performance scores. Avoid animating layout properties like top, left, width, or margin.