Skip to main content

Performance Results

How Astro achieves near-perfect Lighthouse scores with zero JavaScript.

Zero JS by Default

Astro strips all JavaScript from your pages unless you explicitly opt in with hydration directives. This page ships only a minimal View Transitions runtime โ€” zero framework JS.

How It Works

1. Static by Default

Pages are pre-rendered to HTML at build time. No runtime JS needed.

2. Selective Hydration

Only components with client:* directives include JS.

3. Edge Caching

Cloudflare CDN serves pre-built HTML from 300+ global edge locations.

Lighthouse Scores (Target)

100
Performance
100
Accessibility
100
Best Practices
100
SEO

Scores for static pages. Islands demo page may score slightly lower due to framework JS.

Key Techniques

Performance strategy
// Static rendering (default in Astro 6)
// Pages pre-rendered at build โ†’ served from CDN

// Lazy hydrate islands
<Counter client:visible />  // No JS until visible

// Use Astro image optimization
import { Image } from 'astro:assets';
<Image src={img} alt="..." /> // Auto WebP/AVIF

// System font stack โ†’ No FOUT/CLS
font-family: system-ui, -apple-system, sans-serif;