Stay organized with collections
Save and categorize content based on your preferences.
Properties
Optional experimentalForceOwningTab
experimentalForceOwningTab: boolean
Optional synchronizeTabs
synchronizeTabs: boolean
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["# PersistenceSettings | JavaScript SDK\n\n- [firebase](/docs/reference/js/v8/firebase).\n- [firestore](/docs/reference/js/v8/firebase.firestore).\n- PersistenceSettings\n============================================================================================================================\n\nSettings that can be passed to Firestore.enablePersistence() to configure\nFirestore persistence.\n\nIndex\n-----\n\n### Properties\n\n- [experimentalForceOwningTab](/docs/reference/js/v8/firebase.firestore.PersistenceSettings#experimentalforceowningtab)\n- [synchronizeTabs](/docs/reference/js/v8/firebase.firestore.PersistenceSettings#synchronizetabs)\n\nProperties\n----------\n\n### Optional experimentalForceOwningTab\n\nexperimentalForceOwningTab: boolean \nWhether to force enable persistence for the client. This cannot be used\nwith `synchronizeTabs:true` and is primarily intended for use with Web\nWorkers. Setting this to `true` will enable persistence, but cause other\ntabs using persistence to fail.\n\nThis setting may be removed in a future release. If you find yourself\nusing it for a specific use case or run into any issues, please tell us\nabout it in\n\u003chttps://github.com/firebase/firebase-js-sdk/issues/983\u003e.\n\n### Optional synchronizeTabs\n\nsynchronizeTabs: boolean \nWhether to synchronize the in-memory state of multiple tabs. Setting this\nto `true` in all open tabs enables shared access to local persistence,\nshared execution of queries and latency-compensated local document updates\nacross all connected instances.\n\nTo enable this mode, `synchronizeTabs:true` needs to be set globally in all\nactive tabs. If omitted or set to 'false', `enablePersistence()` will fail\nin all but the first tab."]]
Settings that can be passed to Firestore.enablePersistence() to configure Firestore persistence.