How it works
Online-only vs offline-first
Every app sits somewhere on a scale:
| Approach | What it means | Examples |
|---|---|---|
| Online-only | Without a connection the app can only show an error | Live video, payments, ride-hailing, banking transfers |
| Offline-tolerant | Shows saved content and blocks or queues some actions | News, shopping, social media, most e-commerce apps |
| Offline-first | Saves everything on the device first and syncs quietly whenever it can; the network is a bonus | Notes, to-do lists, email, maps with downloaded areas, music with downloads |
Neither is “right”. A bank transfer should refuse to go through offline. A note-taking app that refuses to save a note offline is broken. Your first question as a tester is always: “What is this app supposed to do offline?” If nobody can answer it, that’s already a finding. In the glossary this is called offline modeOffline modeHow an app behaves without a connection: showing cached content, queuing actions, or explaining what's unavailable.Open in glossary →.
What can work offline, and what can’t
| Usually works offline | Can’t really work offline |
|---|---|
| Content you already loaded and the app kept a copy of (cachedCacheStored copies of data or files that make apps and websites load faster.Open in glossary →): lists, articles, order history | Anything that needs fresh server data: live prices, stock, seat availability |
| Drafts: notes, messages, forms, a half-written review | Payments and anything that moves money |
| Queued actions: likes, “add to list”, sent messages, uploads | Search over data that isn’t on the device |
| Downloaded media and map areas | Logging in for the first time, password reset, 2FA codes by SMS |
The tricky middle ground is queued actions. The app pretends the action happened, stores it in a queue (a waiting list on the device), and sends it later. That’s great for users and full of bugs.
Offline indicators
Users need to know when they’re offline, and what that means for them:
- A banner or label (“You’re offline. Changes will sync when you’re back online.”) that appears quickly and disappears when the connection returns.
- Per-item status for queued work: “Waiting to send”, a small clock icon, a greyed-out message.
- Disabled actions with a reason: “Checkout needs an internet connection”, not a button that silently does nothing.
- Stale data labels: “Updated 2 h ago” or “Prices may have changed”. Old data shown as if it were live is one of the most expensive offline bugs (a sale that ended, a balance that’s wrong).
Syncing when you’re back online
- Save locally first. The change is written to the device’s storage, so it survives an app restart or the OS killing the app in the background (see Background and Foreground).
- Put it in the queue. Each change becomes a queue entry: “add Oat milk”, “tick off Eggs”, “delete Bread”. The queue must be saved to the device’s storage too, not only kept in memory (memory is wiped whenever the app closes).
- Notice the connection is back. The app listens for network changes, and tries again when the user reopens it. Don’t trust the signal icon: a phone can be “connected” to Wi-Fi without internet.
- Send the queue in order. “Add Milk” must arrive before “rename Milk to Oat milk”. Failed entries are retried, waiting a bit longer each time (retry with backoffRetry with backoffAutomatically trying a failed request again, waiting longer between each attempt.Open in glossary →).
- Make repeats harmless. A request can arrive at the server even though the app never got the answer, so the app sends it again. Each entry carries a unique ID so the server can recognize a repeat and ignore it. That’s idempotencyIdempotencyAn action that gives the same result no matter how many times it is repeated.Open in glossary →, and without it reconnects create duplicates.
- Resolve conflicts. If someone else changed the same thing in the meantime, the app needs a rule (see the next part).
- Refresh and tell the user. Fetch the latest data, clear the “waiting” badges, hide the offline banner, and report anything that couldn’t be synced.
Check this part
Which of these should usually NOT be queued to run later while offline?
Why must the queue be saved to the device's storage, not only kept in memory?
Why does each queued change carry a unique ID?