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

推荐订阅源

D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
IT之家
IT之家
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research

Netlify Changelog

Gemini 3.5 Flash now available in Agent Runners 4 Nuxt CVEs: what Netlify users need to know Gemini 3.5 Flash now available in AI Gateway Agent Runners workflow improvements Next.js & React security release (May 2026): what to know Block project transfers out of your team Gemini 3.1 Flash-Lite now available in AI Gateway OpenAI GPT-5.5 Instant now available in AI Gateway New `netlify logs` CLI command Deploy to Netlify with Stripe Projects Netlify Database is now generally available OpenAI GPT-5.5 and GPT-5.5 Pro in AI Gateway & Agent Runners Rename an agent run GPT Image 2 now available in AI Gateway New frontend-design skill for Agent Runners Claude Opus 4.7 now available in AI Gateway and Agent Runners Pricing updates for Credit-based plans New sorting and filter controls on the Members page Netlify Database GA coming soon, no new databases for now Deploy logs streaming is now faster Netlify CLI adds prompt-based creation and anonymous deploys Deploy from Codex with the Netlify Plugin Hydrogen with React Router 7 now supported on Netlify Monitor credit usage by day Invoices for Enterprise Available on the Billing Page AI app development on production infrastructure with Netlify Introducing Prompt Templates OpenAI GPT-5.4 Nano and GPT-5.4 Mini in AI Gateway Change your pricing plan Internal Builder Role & Project Access Controls
Supercharge your Astro 4.0 site with the new Netlify Adapter
Nahrin Jalal · 2023-12-23 · via Netlify Changelog

Earlier this month, the Astro team released 4.0 of the Astro framework. Amongst other improvements, it comes with a Dev Toolbar, internationalization support and a new docs page.

We’ve also been hard at work at improving our Astro support, and we’re happy to announce the release of version 4.0 of the Netlify adapter for Astro. Here’s what’s new:

Improvements to Server-Side Rendering (SSR)

HTML Streaming

In October, we shipped Netlify Functions 2.0, and the new Astro adapter fully leverages them.

This means Astro pages now support HTML streaming. Here’s how the Astro docs explain it:

With HTML streaming, a document is broken up into chunks, sent over the network in order, and rendered on the page in that order. In server or hybrid mode, Astro uses HTML streaming to send each component to the browser as it renders them. This makes sure the user sees your HTML as fast as possible, although network conditions can cause large documents to be downloaded slowly, and waiting for data fetches can block page rendering.

Enabling this in your site by following Astro’s guide about it leads to improvements in Time to first Byte (TTFB) and First Contentful Paint (FCP).

Access to Request Context

Besides that, we’re also now making the context object from Functions 2.0 & Edge Functions available to your Astro pages via Astro.locals.netlify.context. You can use this, for example, to access the geolocation of the requesting browser:

const { city } = Astro.locals.netlify.context.geo;

<p>Greetings to {city}, fellow citizen of the world!</p>

Refer to Netlify’s docs to learn more about the context object.

Fine-Grained Cache Control

Last quarter, we shipped Fine-Grained Cache Control. This is our standards-compliant implementation of the CDN-Cache-Control directives, including stale-while-revalidate support. This is straightforward, because you can set them right from your Astro pages - just like any other standard header! For example, the following code snippet caches a page at the edge and transparently updates the cached response at most every 60 seconds without impacting response latency:

const data = await expensivelyQueryDatabase(...)

Astro.response.headers.set('CDN-Cache-Control', 'public, max-age=60, stale-while-revalidate');

<p>Somehow show your {data}</p>

Because you can control caching on a per-page basis, this allows you to create highly-performant and highly dynamic sites, all by setting a few headers in your Astro pages. And if you need even more control, you can invalidate those caches using Cache-Tags and the Purge API.

Image CDN

Last month, we also released Netlify Image CDN in beta - a dead-simple feature to resize, crop and transform images. The new Astro adapter fully makes use of Image CDN, without needing you to implement anything. It’s implemented using an Astro Image Service under the hood, and will provide both:

  1. Improved build time: image transformation is offloaded to the CDN, so it doesn’t need to be performed at build-time anymore
  2. Improved page speed: unlike with static transformations, the CDN now automatically serves each user the right image format for their browser.

The best thing: You don’t need to do a thing, the new Astro adapter does everything for you, by default.

Closing Thoughts

Besides all those exciting user-facing changes in the v4 Adapter, we significantly simplified its implementation - hopefully leading to less bugs and easier maintenance. The full changelog + migration guide, can be found on the @astrojs/netlify@4 release page. We’ll also be around in the issues to help y’all with migrating to the new Adapter.

Working with the Astro maintainers on this new version of the adapter was wonderful, and we’ll be joining them as maintainers for the adapter. Netlify continues to invest into even more powerful and usable core platform primitives, and collaborating with frameworks to ensure they leverage our platform to its fullest.

Astro is a great framework with an even more promising roadmap, and the data in recently-published State of Web Development Report supports that. We can’t wait to see what Astro brings next year!

Speaking of next year: We wish you a Merry Christmas, and a happy new year!