Firebase Realtime Database can work offline by caching data locally. What happens when the device reconnects?
Think about how offline changes are handled when the connection returns.
Firebase automatically syncs local changes made offline with the server once the device reconnects, ensuring data consistency.
Which code snippet correctly enables offline persistence in Firebase Firestore for a web app?
Look for the official method to enable persistence.
The correct method to enable offline persistence in Firestore is enablePersistence().
When using Firebase offline persistence, what is a common challenge related to data consistency?
Consider what happens if two users change the same data offline.
When multiple clients update the same data offline, conflicts can occur upon syncing. Firebase uses last-write-wins to resolve conflicts.
What security risk should developers be aware of when enabling offline persistence in Firebase?
Think about what happens to data stored locally on a device.
Data cached locally can be accessed if the device is lost or compromised, so sensitive data should be handled carefully.
Which approach best ensures user experience and data integrity when users write data offline in Firebase?
Consider user feedback and data reliability during offline usage.
Allowing offline writes with user notifications on sync status balances user experience and data integrity.