Skip to content

Commit

Permalink
Merge pull request #78 from hotwired/disable-link-prefetching
Browse files Browse the repository at this point in the history
Disable link prefetching to match the new behavior on iOS
  • Loading branch information
jayohms authored Dec 18, 2024
2 parents 7155a66 + 66b3d2c commit 4cb86cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/assets/js/turbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@
TurboSession.pageInvalidated()
}

linkPrefetchingIsEnabledForLocation(location) {
// Disable link prefetching since it can be activated by link taps. We
// don't want to prefetch links that may correspond to native screens.
return false
}

// Private

afterNextRepaint(callback) {
Expand Down

0 comments on commit 4cb86cd

Please sign in to comment.