One second down
I’ve always enjoyed pushing optimization to the max, so I made a bold move: I ported my website from Next.js to Astro. The result? I saved a whole second on loading time in PageSpeed Insights.
Next.js vs. Astro
Next.js is a fantastic framework, no doubt about it. It’s a full-fledged solution with everything you need and a strong ecosystem, ideal for large, dynamic applications and e-shops. But for my simple, content-focused blog, Next.js started to seem like unnecessary overhead.
And that’s where Astro comes in. Astro is a framework for content-rich websites
with a simple philosophy:
Send as little JavaScript as possible to the browser. This means that much less data is transferred and loading is
faster, but more importantly, the website doesn’t even hydrate (which is a demanding process), so it runs fast right
from the start.
Svelte, a new job, and Astro
I recently started working at Fastest, where we primarily focus on Svelte. This experience made the entire migration to Astro much easier for me.
Astro components immediately felt familiar to me syntactically. They are written in the *.astro format and their
structure is very intuitive. But the main thing is: Svelte components are fully compatible with Astro! I was able to
take existing Svelte components from other projects and insert them directly into my Astro website. No unnecessary React
wrapping. (But I didn’t do that because I wanted to have a clean Astro project.)
Conclusion: Speed speaks for itself
When I compared the PageSpeed Insights scores before and after migration, the difference was staggering. That one second I saved may seem insignificant, but for users it makes a noticeable difference. Better UX, better SEO, and simply the joy of a fast website. I highly recommend Astro.