Web Performance 101: Core Vitals and Beyond

October 18, 2025 (6mo ago)

Performance isn’t optional—it’s a feature. Here are battle-tested tips for optimizing Next.js apps.

2. Optimize Images

Always use next/image

import Image from 'next/image';
 
export function Hero() {
  return (
    <Image
      src="/hero.jpg"
      alt="Hero image"
      width={1200}
      height={600}
      priority // Load immediately for LCP
      placeholder="blur"
      blurDataURL="data:image/jpeg;base64,..."
    />
  );
}

4. Implement Proper Caching

StrategyUse CaseTTL
force-cacheStatic dataForever
revalidate: 3600Semi-static1 hour
revalidate: 60Frequently updated1 minute
no-storeReal-time dataNever cache

5. Minimize Client Components

Every 'use client' directive adds to your JavaScript bundle. Keep client components small and focused:

6. Bundle Analysis

terminal
# Install analyzer
npm install @next/bundle-analyzer
 
# Run analysis
ANALYZE=true npm run build