-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
A way to disable prefetch with ViewTransitions #8926
Copy link
Copy link
Closed
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)
Description
Astro Info
Astro v3.4.0
Node v20.8.0
System macOS (arm64)
Package Manager pnpm
Output server
Adapter @astrojs/node
Integrations @astrojs/tailwind
@astrojs/solid-js
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have an app with cookie-based authentication and a sign-out link. When ViewTransitions are enabled, hovering over the sign-out link causes the sign-out per se. There should be a way to tell Astro to disable prefetch on some links, adding "data-astro-reload" to a link doesn't prevent prefetching.
What's the expected result?
A data attribute to disable prefetch, perhaps?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hmcjqs
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)