Since 2021, Google has been actively using Core Web Vitals metrics in its ranking algorithm. As of 2024, FID (First Input Delay) has been replaced by INP (Interaction to Next Paint). Now, it's not just the first interaction being measured — the response time of every interaction on the page counts.
LCP — Largest Contentful Paint
LCP measures how long it takes for the largest visible content element (typically the hero image or headline block) to render. Google's "good" threshold is under 2.5 seconds, but for a premium experience, our target should always be under 1.2 seconds.
/* LCP Optimization Strategies */
1. Use <link rel="preload"> for hero images
2. Inline critical CSS (prevent render-blocking)
3. Optimize font loading with display:swap
4. Apply lazy loading only to below-fold images
5. Reduce TTFB below 200ms with a CDN INP — Interaction to Next Paint
INP measures how long it takes the browser to paint the next frame after any user interaction (click, tap, keyboard input). Under 200ms is considered "good", while 200-500ms means "needs improvement."
"When a user clicks a button and doesn't receive visual feedback within 200ms, they perceive the interface as 'broken' — this is a matter of perception, not a technical issue."
The most effective way to optimize INP is to break up long JavaScript tasks that block the main thread. requestIdleCallback, scheduler.yield(), and Web Workers are critical tools for this.
CLS — Cumulative Layout Shift
CLS measures unexpected layout shifts on the page. When an image loads late and pushes text below it, or when a font loads and causes headings to jump — all of these negatively affect the CLS score. Google's threshold is under 0.1.
Practical solutions:
- Add explicit
widthandheightattributes to all images - Use
font-display: optionalorswapfor web fonts - Reserve fixed height space for dynamic content (ads, iframes)
- Use
contain: layoutCSS property for component isolation
What Do We Do at Webify?
The Astro framework we use on this site keeps LCP to a minimum with its zero-JavaScript-by-default policy. We load our fonts with a display: block strategy, serve all images in optimized formats, and keep layout shift near zero. The result: Lighthouse 100/100.