Illustrating Firebase Realtime Database offline capabilities

Disconnect, then (s).

While offline, writes are stored locally, and on_child triggers.

After reconnecting, the writes are synced to Firebase Realtime Database.

You can close and reopen the page and will see the messages you've added while offline.

View the source for more information.