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

Verify with the browser adapter before initiating link prefetching #1354

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

jayohms
Copy link
Collaborator

@jayohms jayohms commented Dec 17, 2024

This resolves an issue found in the Hotwire Native iOS library. See: hotwired/hotwire-native-ios#12

Link prefetching is being triggered on link taps on iOS, which has unintended consequences in the Hotwire Native iOS library. This causes double GET requests when crossing the default and modal context session boundaries, which use separate WKWebView instances.

Additionally, some urls correspond to natively implemented screens, not webviews, so link prefetching is undesirable for these cases, too.

This change allows the Hotwire Native libraries to have control of the link prefetching behavior. We will disable link prefetching in the native libraries where link hovering is not available.

Here are the corresponding Hotwire Native iOS and Hotwire Native Android PRs:

…o the Hotwire Native libraries can have control of the link prefetching behavior.
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