What Happens When the Network Drops? Designing Systems That Work Offline
"The internet doesn't just stay down — do we really need offline features?" People who ask that usually haven't lived through a network outage at a storefront during peak hours. Five customers queued at the register, the system spinning, the clerk apologizing with a forced smile — those five minutes feel longer than five hours. Our systems support the daily operations of physical stores, so "what happens when the network drops" isn't hypothetical — it's a required question in system design. This article covers offline-capable design thinking, and the genuinely hard part behind it: data consistency.
First, an Honest Assessment: How Offline Does Your System Need to Be?
Offline capability has a cost — and not a small one — so step one is tiering, not doing everything:
- Must work offline: operations that stand between you and revenue. Store checkout, scan validation, order-taking — the parts where no network means the business stops.
- Read-only offline is enough: price lists, product info, today's booking list. Viewable but not editable already resolves 80% of the awkwardness.
- Can wait for the network: reports, back-office admin, data exports. Making these offline-capable is wasted budget.
For most projects the correct answer is "critical path works offline; everything else waits for connectivity." Going fully offline can double a project's budget.
The Three Layers of Offline Design
1. Offline Caching: Make the Screen Open at All
The most basic layer stores the application itself and frequently used data (products, prices, member lists) on the device, so when the network drops, the interface still opens and lookups still work. Web technology has matured a lot here in recent years — PWA caching mechanisms exist for exactly this (see what is a PWA). The design questions at this layer are "cache what, refresh how often": data that changes, like product prices, needs versioning with incremental updates when online — you can't save one copy on launch day and use it until the end of time.
2. Offline Writes: Record Locally, Send When Reconnected
The real challenge starts with "creating data while offline." Checkout receipts, new members, and inventory movements during an outage must first be written to a local outbound queue, then replayed to the server in order once the network returns. Two devils live in these details:
- Replay must be duplicate-proof. On a flaky connection, an order can be sent while the response never arrives — resend it and you've got two. The fix is a unique identifier on every operation, so the server accepts a duplicate only once. Skip this mechanism and you'll pay for it at month-end reconciliation.
- Think through numbering ahead of time. If order numbers come from the server, you can't issue them offline. The common fix: the device assigns a temporary number (with a device identifier to avoid collisions), and the server assigns the official number after sync. Anything legally required to be sequential — like government e-invoicing — needs special design; confirm the offline-issuance rules with your e-invoicing provider up front.
3. Sync Conflicts: Both Sides Changed It — Who Wins?
The hardest layer. Store A edits a member's phone number while offline; back office edits the same field at the same time; the network returns and the two versions collide. Textbooks offer plenty of algorithms; our practical advice is: eliminate conflicts with business rules rather than resolving them with algorithms. For example: model inventory changes as "increment/decrement records" rather than "overwrite the number" — both sides' changes stand, and the sum comes out right. Give member data a single designated editing entry point and make other endpoints read-only. For conflicts you genuinely can't avoid, hand them honestly to a human — showing a manager both versions to choose from beats a system that cleverly picks wrong.
The core of offline design isn't "keep the system running when the network drops" — it's "once the network returns, everyone shares one version of the truth about what happened."
Don't Forget the Drill
One last recommendation: once the offline mechanism is built, actually pull the network cable and test — following the operational script: go offline, take three orders, reconnect, verify the data; then cut the connection again mid-sync and see whether half-baked data appears. Offline capability is insurance, and the worst thing about insurance is discovering the fine print was wrong on the day you claim. If your operation can't afford an outage and you want this insurance built solid, come talk to us: custom systems and SaaS development.
We solve these problems on our own products every day
Free 30-min discovery call · No hard sell · Reply within one business day
Keep Reading