Nâng CaoSEO iconSEO

Cách tối ưu Largest Contentful Paint (LCP) trong React/Next.js?

LCP đo thời gian render element lớn nhất trên viewport — optimize bằng cách xác định đúng LCP element rồi tối ưu theo loại: image, text, hay video poster.

Target: <2.5s. Xác định LCP element: dùng Chrome DevTools Performance tab hoặc web-vitals library.

Tối ưu theo loại:

  1. Image LCP: priority prop trong next/image, preload với <link rel='preload'>, avoid lazy load, dùng CDN, responsive sizes, WebP
  2. Text LCP: font-display swap, preload font file, avoid web font nếu được (system font stack)
  3. Video poster: preload poster image

Server optimizations: reduce TTFB (<600ms) bằng SSG/ISR/edge functions, streaming SSR.

Tránh: redirect chains, render-blocking CSS/JS lớn, client-side data fetch trước khi render LCP, quá nhiều third-party scripts (analytics, chat widgets). Trong Next.js: next/image với priority, next/font với display: swap, App Router streaming.

Xem toàn bộ SEO cùng filter theo level & chủ đề con.

Mở danh sách SEO