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

Turbo Frame navigation with [data-turbo-action] and Turbo cache opting out #467

Closed
tortuetorche opened this issue Nov 23, 2021 · 1 comment

Comments

@tortuetorche
Copy link

tortuetorche commented Nov 23, 2021

Hi folks,

Since Turbo v7.1.0-rc.3, I've some issues when Turbo cache is opting out (<meta name="turbo-cache-control" content="no-cache">).
When I go to previous pages with back and forward buttons of my Web browser (Firefox or Chromium) a full page (from the latest Turbo Drive or full page navigation) is restored instead of the expected Turbo Frame.

How to reproduce this issue:
Git clone this repository: https://github.com/gorails-screencasts/422-hotwire-datatables

In the app/views/layouts/application.html.erb file add this line <meta name="turbo-cache-control" content="no-cache">, like this:

<head>
  ...
  <meta name="turbo-cache-control" content="no-cache">
</head>

In the Gemfile file, replace this line:

gem "turbo-rails", github: "hotwired/turbo-rails" #">= 0.7.11"

By this one:

gem "turbo-rails", github: "hotwired/turbo-rails", ref: '61267f73272ad25eb4d3f06fc0f7b8205ca5df84'

Adjust the username, password and database name in the config/database.yml file

Setup the Rails application, just run ./bin/setup, then ./bin/rails db:seed, then ./bin/rails server, then hit http://localhost:3000

Finally, click on the different headers of the Employees table (Position, Age, Start Date...), then hit the Back button of your Web browser

Have a good day,
Tortue Torche

@tortuetorche
Copy link
Author

tortuetorche commented Nov 23, 2021

The pull request #466 seems to fix this issue as well, but I need to do more tests...
Edit: OK, the pull request definitively fix this issue, many thanks @seanpdoyle 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant