E-commerce sites are notoriously heavy. Between tracking scripts, high-res images, and complex cart logic, hitting green on Core Web Vitals is a real challenge.
Tackling Interaction to Next Paint (INP)
The newest core web vital replacing FID is incredibly strict on main-thread blocking JavaScript.
- Yield to Main: Break up long tasks using setTimeout or the new scheduler.yield() API.
- Optimize React Rendering: Prevent unnecessary re-renders in your cart context providers.
Largest Contentful Paint (LCP)
Your product hero image is usually your LCP element. Preload it aggressively and ensure it's not lazy-loaded.
"Lazy loading an LCP image is the single most common mistake in modern web development."



