From 874872aced8f63a0b2bc41e438ad89563aac1515 Mon Sep 17 00:00:00 2001 From: Paul DobbinSchmaltz Date: Mon, 27 Jan 2025 14:59:05 -0600 Subject: [PATCH] Turn off Turbo prefetch for most links Instead of zeroing in on each link or link type to not pre-fetch, this commit just disabled it for entire pages. See: https://turbo.hotwired.dev/handbook/drive#prefetching-links-on-hover I'm making this change, not because I've seen and measured that we're seeing too much activity on the site. But, just out of a gut feel that it's not worth the extra requests when hovering over links. We've already got so many requests coming in just for the Game play itself! So I'm just proactively making this change. Besides, the pages load so fast on their own that the pre-fetch doesn't seem to add much of anything. --- app/views/application/_footer.html.erb | 1 + app/views/games/_listings.html.erb | 1 - app/views/games/index.html.erb | 8 +++++--- app/views/metrics/show.html.erb | 5 ++++- app/views/users/show.html.erb | 5 ++++- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/views/application/_footer.html.erb b/app/views/application/_footer.html.erb index 29c65631..3ab1e61f 100644 --- a/app/views/application/_footer.html.erb +++ b/app/views/application/_footer.html.erb @@ -6,6 +6,7 @@ flex max-lg:flex-col gap-y-6 justify-between items-center " + data-turbo-prefetch="false" >