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

bug: Remove bfcache on back button click in firefox #295

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

philter87
Copy link
Collaborator

@philter87 philter87 commented Mar 18, 2024

Description

  • This PR fixes bug. The loading bar in 'metadata-create' reappears when hitting 'back' button in chrome. This is solved by removing bgcache (back-forward cache) in firefox. (I did not know this was a thing)

Related Issues

Closes #201

Testing

  • Yes
  • No, not needed (give a reason below)
  • No, I need help writing them

Hard to create a unit test for this, but I have tested manually.

Reviewer Focus

This PR only needs a quick review.

Checklist

For all PRs that are not general documentation

  • [] Tests accompany or reflect changes to the code
  • Tests ran and passed locally
  • Ran the linter and formatter
  • Build has passed locally
  • Relevant documentation has been updated

@philter87 philter87 requested a review from a team as a code owner March 18, 2024 10:08
@K-Beicher
Copy link
Contributor

@philter87 Are we worried that when googling 'unload event' the developer.mozilla website states that it should no longer be used, should there be a note about it being deprecated, or are they referring to something different?

https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event

@philter87
Copy link
Collaborator Author

@philter87 Are we worried that when googling 'unload event' the developer.mozilla website states that it should no longer be used, should there be a note about it being deprecated, or are they referring to something different?

https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event

Nice catch! I will investigate a bit more. It might be a problem

@philter87
Copy link
Collaborator Author

philter87 commented Mar 20, 2024

@K-Beicher. You are right, that it is not an optimal solution, but I am unable to find a better solution for clearing the bfcache in Firefox. I have found a long discussion about it here but it seems that there is no simple way to opt-out of the bfcache, yet.

But there could be another solution. Maybe we can remove the page in the browser history as returning to it might cause some weird behaviour - like uploading the columns twice

@K-Beicher
Copy link
Contributor

@lwjohnst86 is it possible to make an issue that will appear in a years time to revisit this and see if a solution has shown up?

@lwjohnst86 lwjohnst86 merged commit 3044a95 into main Mar 20, 2024
4 checks passed
@lwjohnst86 lwjohnst86 deleted the bug/remove-bfcache-in-firefox branch March 20, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[bug]: "extracting metadata" progress bar in file-upload remains after clicking back from 404 page
3 participants