Budgets first
- Keep JavaScript under ~150kb gzip per page.
- Prefer static + cached HTML over runtime fetches.
- Set long
Cache-Controlfor hashed assets; short for HTML.
Cache-friendly routing
Serve index.html per route (e.g., /blog/my-post/index.html) so Cloudflare can cache the whole
response without extra headers. The prerender step produces these files automatically.
Measure and tune
Use Lighthouse locally and watch edge analytics to keep LCP and CLS in check. Small regressions add up fast when you ship weekly.