Web framework: Astro 5.3 accelerates the rendering of websites
The web framework changes the rendering of components, which is intended to achieve higher speeds, particularly for complex websites.
(Image: Grisha Bruev/Shutterstock.com)
In version 5.2, the JavaScript framework Astro allows faster page rendering –, especially for websites with many components –, and it extends the Netlify adapter with two new options for bundling.
Render complex pages faster
In Astro, async functions can be used within components. Previously, every component and every page was rendered asynchronously, even if this was not necessary, which according to the Astro team could lead to some overhead. Therefore, Astro 5.3 introduces the change that it only renders a component asynchronously if it actually contains an async function call.
This should lead to significantly faster rendering of synchronous components, although the exact degree of acceleration depends on the individual website. Complex pages with many components should benefit the most from this. In contrast, pages that use slow external APIs at request time, for example, may not show any change in speed.
As the Astro team has tested, the response times for server-side rendering (SSR) are generally 1.5 to 2 times faster with the new method, provided the page does not call any external APIs. The static build time of the Astro documentation page was reduced by 10 to 15 percent and in the Platformatic SSR benchmark, which generates a page with over 3000 components, requests now run four times faster.
Developers do not need to make any adjustments themselves to use the new rendering behavior.
(Image:Â WD Ashari/Shutterstock.com)
enterJS 2025 will take place on May 7 and 8 in Mannheim. The conference offers a comprehensive look at the JavaScript-supported enterprise world. The focus is not only on the programming languages JavaScript and TypeScript themselves, but also on frameworks and tools, accessibility, practical reports, UI/UX and security.
Highlights from the program:
- Islands Architecture with Astro
- Vue in the year 2025: A rock in the surf?
- 4 critical antipatterns in React/TypeScript development
Tickets are available at an early bird price in the online store.
Updates for HEAD requests and Netflify connection
API endpoints can now automatically handle HEAD requests if a GET handler is defined. Astro calls the latter and returns the response with an empty body. Developers who prefer a different handling of HEAD requests can still define a separate handler.
Developers also have more control over bundling with the Netflify serverless platform. The Vercel adapter already had the excludeFiles and includeFiles options to define which files the bundle should or should not contain. Now the Netflify adapter follows suit and also receives these options. They accept an array of globs or paths:
{
adapter: netlify({
includeFiles: ["src/locales/**/*.po"],
excludeFiles: ["node_modules/big-package/chonky-file.bin"],
}),
}
Existing Astro projects can be updated to the new version using the automated CLI tool @astrojs/upgrade. A manual update is also possible.
Further information on the new release can be found on the Astro blog.
(mai)