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

Support bfcache #1888

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Support bfcache #1888

merged 1 commit into from
Jan 31, 2024

Conversation

dfahlander
Copy link
Collaborator

This pull-request addresses #1776.

It listens to pagehide and pageshow events.

pagehide:

  • Stop BroadcastChannel
  • Close all open Dexie instances into a state where they will auto-open next time a request comes in.

pageshow:

  • Start BroadcastChannel to listen for live queries
  • Fire off all liveQueries since we don't know which ones have been updated.

Also remove the legacy fallback for browsers without StorageManager.
Reason: It only applied to Safari<16 but those versions of safari had buggy storage implementations of localStorage anyway.
@dfahlander dfahlander merged commit 46b2903 into master Jan 31, 2024
5 checks passed
@dfahlander dfahlander deleted the support-bfcache branch January 31, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant