diff --git a/.changeset/sixty-dogs-sneeze.md b/.changeset/sixty-dogs-sneeze.md new file mode 100644 index 000000000000..13f89232898d --- /dev/null +++ b/.changeset/sixty-dogs-sneeze.md @@ -0,0 +1,24 @@ +--- +"astro": minor +--- + +Adds an experimental flag `clientPrerender` to prerender your prefetched pages on the client with the [Speculation Rules API](https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API). + +```js +// astro.config.mjs +{ + prefetch: { + prefetchAll: true, + defaultStrategy: 'viewport', + }, + experimental: { + clientPrerender: true, + }, +} +``` + +Enabling this feature overrides the default `prefetch` behavior globally to prerender links on the client according to your `prefetch` configuration. Instead of appending a `` tag to the head of the document or fetching the page with JavaScript, a `