Shipping sub-second sites with Astro and Cloudflare

2026-03-10 · 6 min

AstroCloudflarePerformance

Enterprise clients and government agencies sometimes run Lighthouse audits before engaging a studio. Here is our checklist for 95+ scores on both mobile and desktop.

Static-first with Astro

Astro ships zero JavaScript by default. We add Motion only where animation adds value, such as hero reveals, count-ups and scroll-triggered cards. Everything else is HTML and CSS.

Image strategy

WebP with explicit width and height to prevent CLS. Lazy loading below the fold. Unsplash URLs with `auto=format` for modern formats. SVG logos for project cards.

Edge caching

Cloudflare Pages with aggressive cache headers on `/_astro/*` and images. API routes get `no-store`. HTML gets short TTL with stale-while-revalidate.

Core Web Vitals targets

- LCP under 2.5s (hero image preloaded, critical CSS inlined) - INP under 200ms (minimal JS, passive scroll listeners) - CLS under 0.1 (reserved space for images and fonts)

Takeaway

Performance is a feature. Fast sites convert better, rank higher and signal engineering discipline to technical buyers.

← All articles