惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Project Zero
Project Zero
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
S
Schneier on Security
N
News and Events Feed by Topic
N
News | PayPal Newsroom
H
Help Net Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
The Exploit Database - CXSecurity.com
Attack and Defense Labs
Attack and Defense Labs
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
A
About on SuperTechFans
AWS News Blog
AWS News Blog
S
Secure Thoughts
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
C
Cybersecurity and Infrastructure Security Agency CISA
V2EX - 技术
V2EX - 技术
Recorded Future
Recorded Future
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
人人都是产品经理
人人都是产品经理
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
大猫的无限游戏
大猫的无限游戏
The Last Watchdog
The Last Watchdog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
月光博客
月光博客
H
Hacker News: Front Page
P
Proofpoint News Feed
N
News and Events Feed by Topic
H
Heimdal Security Blog
L
Lohrmann on Cybersecurity
有赞技术团队
有赞技术团队
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13 What's new in Astro - July 2025 Astro 5.12 Starlight 0.35 Astro 5.11 What's new in Astro - June 2025 Live Content Collections: A Deep Dive Introducing… Astro Mart Astro Solstice Festival Astro 5.10 Astro 5.9 What's new in Astro - May 2025 Astro 5.8 What's new in Astro - April 2025 2025 Technical Steering Committee Starlight April Update Astro 5.7 Astro Agency Partner Program Astro 5.6 What's new in Astro - March 2025 Astro 5.5 What's new in Astro - February 2025 Astro 5.4 Starlight 0.32 What's new in Astro - January 2025 Astro 5.2 2024 year in review What's new in Astro - December 2024 Astro 5.1 Astro 5.0 Google IDX: Our Official Online Editor Partner What's new in Astro - November 2024 What's new in Astro - October 2024 Astro x Cloudinary SDK What's new in Astro - September 2024 Community Loaders for Astro Content Layer Astro x Hygraph: Content Loader Astro x Cloudinary: Content Loader Astro x Storyblok: Content Loader Content Layer: A Deep Dive Starlight 0.28 Astro 5.0 Beta Release The $100,000 Astro Ecosystem Fund Fall Update Goodbye Studio, Hello DB What's new in Astro - August 2024 Astro 4.15 Astro 4.14 Astro 4.13 What's new in Astro - July 2024 Astro 4.12: Server Islands Netlify: Our Official Deployment Partner What's new in Astro - June 2024 Astro 4.11 Astro Together 2024 Server Islands The Astro Content Layer Zero-JavaScript View Transitions Astro 4.10 Starlight turns one year old! What's new in Astro - May 2024 Astro 4.9 Astro 4.8 What's new in Astro - April 2024 Astro 4.7 Astro 4.6 What's new in Astro - March 2024 Migrating 500+ tests from Mocha to Node.js Astro DB: A Deep Dive The Astro Developer Portal Astro DB Astro 4.5
Astro 5.3
Matt Kane · 2025-02-13 · via The Astro Blog

Astro 5.3 is here with faster page rendering, easier setup for experimental sessions, and more!

💘 It’s the season of love, and you’re sure to fall for these improvements to Astro:

  • Faster page rendering
  • Automatic session storage setup
  • More control over Netlify bundling
  • Improved handling of HEAD requests

To upgrade an existing project, use the automated @astrojs/upgrade CLI tool. Alternatively, upgrade manually by running the upgrade command for your package manager:

# Recommended:

npx @astrojs/upgrade

# Manual:

npm install astro@latest

pnpm upgrade astro --latest

yarn upgrade astro --latest

Faster page rendering

Astro makes it easy to use async functions inside components, but previously this meant that every component and page was rendered asynchronously, even if it wasn’t needed. When this happens for every component on a page, the overhead from these promises can really add up!

Now, thanks to an awesome community contribution from MatthewLymer from Fora, Astro will only render components asynchronously if… (a)wait for it… they actually contain an async function call.

In benchmarks, this has resulted in a significant speedup for rendering synchronous components. This benefits both on-demand and static builds, though the biggest improvements are seen in SSR response times. This even helps pages that use async functions, because most components on the page will still be synchronous.

The exact amount of the improvement will depend on the individual sites. Complex pages with many components will see the biggest improvements, while pages that use slower external APIs at request time may be unchanged. In our testing, SSR responses are generally 1.5-2x faster unless the page is querying external APIs. Some examples:

You don’t need to do anything to benefit from this improvement: just sit back and enjoy the faster rendering times.

Automatic session storage setup

Astro 5.1 introduced the experimental session storage API, which allows developers to easily manage user sessions on the server. The feature supports dozens of different backend storage drivers, powered by unstorage.

Previously you needed to configure a session storage driver in your astro.config.mjs, but now Astro will automatically set up the session storage for you when using a supported adapter.

We’re starting with support for the @astrojs/node adapter, which uses the filesystem for storage, and @astrojs/netlify, which uses Netlify Blobs. We hope to add default driver support for more adapters in the near future, where the hosting platforms include a storage API. In all cases, you can still manually configure your own session storage driver if a default one does not exist or you prefer to use a different one.

If you haven’t experimented with the session storage API yet, you can enable this feature by setting the experimental.session flag to true in your astro.config.mjs:

{

adapter: node({

mode: "standalone",

}),

experimental: {

session: true,

},

}

If you are already using the session feature, you will need to update your configuration for the new syntax with this breaking change.

The experimental.session option is now a boolean flag that you can set true and enjoy a default session storage driver with a supported adapter, no further configuration needed!

Session configuration itself has moved to a top-level session key. This allows you to configure a non-default driver, as well as other options such as a base prefix or expiration ttl.

{

adapter: node({

mode: "standalone",

}),

experimental: {

session: {

driver: "upstash",

},

session: true,

},

session: {

driver: "upstash",

},

}

For more details and examples, see the experimental session docs.

More control over Netlify bundling

When Astro builds your site to deploy to a serverless platform like Netlify or Vercel, it needs to bundle all the files and dependencies needed to run your site. The Netlify and Vercel adapters use the same library for this, which is usually good at working out what’s needed.

It doesn’t always get this right though: sometimes it misses a file that you need, particularly if it’s a static file that you are loading with filesystem functions. Other times it includes files that you don’t need, which can slow down your build and increase your bundle size, particularly if it’s something like a large binary.

To deal with this, the Vercel adapter already has excludeFiles and includeFiles options that allow you to specify files that should be excluded or included in the bundle. With this release, these options are available in the Netlify adapter as well. Both options accept an array of paths or globs.

{

adapter: netlify({

includeFiles: ["src/locales/**/*.po"],

excludeFiles: ["node_modules/big-package/chonky-file.bin"],

}),

}

Thanks to Dani Fernández who contributed this feature.

Improved handling of HEAD requests

API endpoints will now automatically handle HEAD requests if a GET handler is defined. Astro will call the GET handler and return the response with an empty body. If you’d prefer to handle HEAD requests differently, you can still define a separate handler. See the API endpoints docs for more details.

Thanks to Vitalii Rybachenko from Netlify for this contribution.

Bug fixes

As always we’ve been working hard on fixing issues since the 5.2 release. See the changelog for all the details.

Thanks

Thanks to everyone who contributed to this release, including Emanuele Stoppa, Sarah Rainsberger, HiDeoo, Yan Thomas, Dani Fernández, unprintable123, Sean Boult, Armand Philippot, Vitalii Rybachenko, Cornelius Roemer, and many more. Extra thanks to MatthewLymer for the excellent work on the faster rendering improvements.

We look forward to seeing what you build with Astro 5.3! If you have questions, comments, or just want to say hi, drop by the Astro Discord.