Settings that can be passed to Firestore.enablePersistence() to configureFirestore persistence.

Index

Properties

Optional experimentalForceOwningTab

experimentalForceOwningTab:boolean

Whether to force enable persistence for the client. This cannot be usedwithsynchronizeTabs:true and is primarily intended for use with WebWorkers. Setting this totrue will enable persistence, but cause othertabs using persistence to fail.

This setting may be removed in a future release. If you find yourselfusing it for a specific use case or run into any issues, please tell usabout it inhttps://github.com/firebase/firebase-js-sdk/issues/983.

Optional synchronizeTabs

synchronizeTabs:boolean

Whether to synchronize the in-memory state of multiple tabs. Setting thistotrue in all open tabs enables shared access to local persistence,shared execution of queries and latency-compensated local document updatesacross all connected instances.

To enable this mode,synchronizeTabs:true needs to be set globally in allactive tabs. If omitted or set to 'false',enablePersistence() will failin all but the first tab.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.