enableMultiTabIndexedDbPersistence
deprecatedAttempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.
On failure, enableMultiTabIndexedDbPersistence()
will reject the promise or
throw an exception. There are several reasons why this can fail, which can be
identified by the code
on the error.
- failed-precondition: The app is already open in another browser tab and multi-tab is not enabled.
- unimplemented: The browser is incompatible with the offline persistence implementation.
Note that even after a failure, the Firestore instance will remain usable, however offline persistence will be disabled.
This function will be removed in a future major release. Instead, set
FirestoreSettings.localCache
to an instance of PersistentLocalCache
to
turn on indexeddb cache. Calling this function when FirestoreSettings.localCache
is already specified will throw an exception.