Open drale2k opened 10 months ago
HEY also has this problem. For example, take an unread mail in Paper Trail. Open it and then go back. It still shows up as unread because it doesn't refresh.
This is intentionally designed into Turbo for some reason unknown to me, although I would love for it not to be. Maybe I could open a PR to propose the change.
Then it seems to be on a screen by screen basis, likely decided based on screen importance. I would also like to see it gone or at least not be the the default behaviour and alternatively have a way to opt-in in case this was added for good reason (bandwidth preservation on mobile devices maybe).
I think going into 2024 we are at a point technologically where going back is not only safe to re-fetch data most of the time but also expected by the regular user. With the ability to opt out (reverse of turbo-cache-control
) in case your users are from areas around the world where bandwidth is expensive or slow.
i have read about how Turbo Drive handles caching from the docs and understand that when caching is enabled (by default), Turbo will load a cached version from the browser when the back button is clicked. However, this means you get obsolete content of the previous page you go back to and have to hard reload anyway to make sure you did not miss anything. Worst case users don't know to reload and will see an outdated page.
The only way around this issue seems to be to opt out of caching completely, using
<meta name="turbo-cache-control" content="no-cache">
.When looking at Basecamp and HEY though, both apps perform a network request to fetch a fresh page when the back button was hit. They do that without using the
no-cache
directive and i would like to know how this is done or rather what the correct approach is to this issue.