Speed is a feature. Every 100ms you shave off load time improves conversion, search ranking and how premium your brand feels. Here's the playbook we follow on every web growth platform we build.
1. Ship less JavaScript
Astro renders pages to plain HTML by default and only loads JavaScript where a component actually needs it. We keep interactive islands small and load them when they scroll into view.
2. Treat images as the biggest budget item
- Serve modern formats (AVIF/WebP) with responsive sizes.
- Load only the hero image eagerly; lazy-load everything else.
- Always set width and height to avoid layout shift.
3. Animate with the compositor
Motion should feel smooth, not heavy. We animate only transform and opacity, pause canvas scenes when they're off-screen, and respect the user's reduced-motion setting.
“Fast sites don't happen at the end of a project. They're a decision you make on day one.”
Combine these habits with a CDN and good caching headers and sub-second loads become the normal result rather than a lucky one.
Written by
Kasun Perera
Head of Engineering, Glamer Media