Skip to content

A way to disable prefetch with ViewTransitions #8926

@fuwaneko

Description

@fuwaneko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)feat: view transitionsRelated to the View Transitions feature (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions