- If updating an existing site, measure current performance so you can compare.
- Use component architecture with scoped styles and scripts.
- Use content-visibility.
- Inline styles and scripts.
- Minify
- Optimize fonts.
- Optimize images.
- Prefetch/prerender links and assets.
- For a small site, manually adding
rel="prefetch"
is easiest. - You can also use speculation rules, but those aren't widely supported yet.
- You can also use Astro's
Prefetch
component.
- For a small site, manually adding
- Cache assets in the browser using HTTP headers.
- Jampack it if necessary.
- If I'm building with Astro or 11ty, this seems a little redundant. It does some additional image compression which could save you quite a few bytes if you have a lot of images.
- Measure.