Does Firestore persistence sharing via shared worker work reliably in Safari private browsing?
0 reputation · 17 Nov 2023, 13:59 UTC
Goal
Determine whether enabling Firestore persistence with enablePersistence() results in a single shared IndexedDB cache across multiple tabs when the application is used in Safari private browsing mode, given that the SDK attempts to share persistence via a shared worker but sharing is not guaranteed across all browsers.
Constraints include the variability of Safari's private browsing restrictions, potential site‑isolation policies, and the lack of automatic conflict resolution between divergent caches.
- Does Firestore create a shared persistence layer in Safari private browsing, or does each tab maintain its own cache?
- If separate caches arise, what observable behavior occurs when a document is modified offline in one tab and the app reconnects?
- Are there any SDK configuration options or workarounds that can enforce sharing or mitigate stale‑read risks in this scenario?