mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
530 B
530 B
@astrojs/prefetch |
---|
patch |
Adds a new @astrojs/prefetch
integration with the goal of adding near-instant page navigation for Astro projects. HTML and CSS for visible links marked with rel="prefetch"
will be preloaded in the browser when the browser is idle.
astro.config.mjs
import prefetch from '@astrojs/prefetch';
export default {
// ...
integrations: [prefetch()],
}
<!-- Prefetch HTML and stylesheets for the /products page -->
<a href="/products" rel="prefetch">All Products</a>