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

Frames are caching too late #745

Closed
manuelpuyol opened this issue Sep 28, 2022 · 3 comments · Fixed by #746
Closed

Frames are caching too late #745

manuelpuyol opened this issue Sep 28, 2022 · 3 comments · Fixed by #746

Comments

@manuelpuyol
Copy link
Contributor

Kinda related to #643

When doing a frame navigation, the frame src changes before the page is cached, causing some weird interactions when going back/forwards.

Example

Frames with data-turbo-action="advance"

Screen.Recording.2022-09-28.at.2.27.41.PM.mov
@manuelpuyol manuelpuyol changed the title Frames are caching too early Frames are caching too late Sep 28, 2022
@manuelpuyol
Copy link
Contributor Author

@seanpdoyle it looks like when the frame is promoted with advance, we start a visit after the frame is already loaded, so the PageView snapshot cache is running with the new HTML instead of the original one

seanpdoyle added a commit to seanpdoyle/turbo that referenced this issue Sep 28, 2022
@seanpdoyle
Copy link
Contributor

@manuelpuyol thank you for opening this issue and providing instructions on how to reproduce.

I've pushed up a breaking test to https://github.com/hotwired/turbo/compare/seanpdoyle:fix-issue-745, and am investigating a resolution.

@manuelpuyol
Copy link
Contributor Author

Thanks for looking into this @seanpdoyle !

I opened a possible solution here #746, gonna pull in your tests to check if they pass

@dhh dhh closed this as completed in #746 Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants