Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Astro prefetch behaviour #201

Open
jbmoelker opened this issue Nov 4, 2024 · 0 comments
Open

Configure Astro prefetch behaviour #201

jbmoelker opened this issue Nov 4, 2024 · 0 comments
Labels
enhancement New feature or request performance

Comments

@jbmoelker
Copy link
Member

User stories

As a website visitor,
I want web pages to be prefetched,
so that navigation is instant when I hit a link.

As a website editor,
I want web pages to be cached only shortly,
so that the changes I make propagate reasonably quickly.

Approach

Use Astro's prefetch feature.

Questions

  • Which default strategy should we use (hover, tap, viewport, load)?
  • Do we add caching headers for better Firefox and Safari support? Cloudflare doesn't provide ETags, but we could add short Cache-Control and Expires headers either through public/_headers config or in a Service Worker (see Add Service Worker #199). Through a Service Worker we could even add our own ETags 🤔.
  • If our default prefetching is conservative (hover or tap), should we add inline hints [data-astro-prefetch="load"] to the main menu items (see Editable site menu #196)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

1 participant