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

Disable link prefetching via the turbo js adapter to prevent double-visit requests #62

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

jayohms
Copy link
Contributor

@jayohms jayohms commented Dec 17, 2024

This addresses the double-visit request issue found in #12. It works with the new adapter function in core turbo.js added here: hotwired/turbo#1354

The root issue is that link taps on iOS are triggering the mouseenter and mouseleave events used to activate link prefetching. This theoretical optimization actually creates wasteful GET requests across the default and modal context WKWebView instances.

…isit requests when tapping on links that cross the default/modal context boundaries.
@jayohms jayohms merged commit 22dd671 into main Dec 18, 2024
1 check passed
@jayohms jayohms deleted the disable-link-prefetching branch December 18, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant