With turbo-rails 7.3.0 (latest version at the time of this post):
Let’s say you use “advance” mode with Turbo frames which allows you to update a URL as you navigate between frames. This is very handy in a number of use cases such as having a sidebar with a main content area. Each sidebar link could render a new frame in the main content area to avoid rendering an expensive sidebar.
I ran into this exact use case with a video platform where I want to use frames to avoid reloading an <iframe> to have a permanent video that doesn’t lose its playback position and to also avoid rendering an expensive query to render a table of contents. Turbo frames feels like it was designed for this exact purpose!
The problem with the above is Turbo frames only swaps the frame (by nature) but when navigating between URLs you would expect the following <head> tags to be updated:
Not having these updates is kind of a deal breaker for using Turbo frames with “advance” where you change the URL since having those <head> fields not get updated could penalize you from Google and other crawlers. It also makes your site appear to be buggy. For example here’s an issue from the exercism.io site which uses frames in this way but doesn’t get updated properly Browser tab shows wrong title · Issue #6636 · exercism/exercism · GitHub.
Any thoughts or suggestions on how to handle this in a clean way?
Turbo still excludes everything outside of the frame itself, except for specific items like Turbo-specific meta tags that it checks for. So although this change sounds a bit like what you’re describing, it’s not really the same thing, unfortunately.