More
Сhoose

Engineering

African

Excellence

ANED Dev Center

Offline-First Apps

Building Offline-First Applications
for the Next Billion Users

Building Offline-First Applications for the Next Billion Users
Category:  Engineering
Date:  February 2026
Author:  ANED Dev Center
Read:  9 min

The majority of the world's next billion internet users will come online in Africa, South Asia, and Southeast Asia, regions where connectivity is not a constant but a variable. In much of sub-Saharan Africa, a stable broadband connection is a luxury. Mobile data is expensive relative to income, 2G and 3G networks still serve hundreds of millions of users, and power outages routinely take cell towers offline. For software engineers building applications for these markets, the traditional assumption that users are always connected is not just wrong but a fundamental design flaw that renders applications unusable for the people who need them most. Offline-first architecture is the answer, and at ANED, it is how we build every product.

Why Online-First Fails in African Markets

The standard web application architecture assumes a fast, reliable connection between the client and server. Every user action triggers an API call, and the UI blocks until the server responds. On a fibre connection in San Francisco, this round trip takes 50 milliseconds and is imperceptible. On a 2G connection in rural Kenya, the same round trip can take 10 seconds or simply time out. The result is an application that feels broken: buttons that do not respond, forms that lose data when the connection drops mid-submission, and loading spinners that spin indefinitely. Users do not blame the network. They blame the application, and they stop using it.

The data costs compound the problem. In many African countries, a gigabyte of mobile data costs between 2 and 10 percent of average monthly income. Every unnecessary API call, every uncompressed image, every JavaScript bundle that could have been cached but was not, costs the user real money. An application that downloads 5 megabytes of JavaScript on every visit is not just slow. It is expensive. And for users who prepay for data in small bundles, a single heavy page load can consume their entire daily data allocation. Offline-first architecture addresses both problems simultaneously: by minimising network dependence, it makes applications both faster and cheaper to use.

Service Workers: The Foundation of Offline Capability

Service workers are the core technology that enables offline-first web applications. A service worker is a JavaScript file that runs in the background, separate from the web page, and acts as a programmable network proxy. It intercepts every network request the application makes and can serve cached responses when the network is unavailable. For static assets like HTML, CSS, JavaScript, and images, the strategy is straightforward: cache on first load, serve from cache on subsequent visits, and update the cache in the background when connectivity allows. This approach means that after the initial visit, the application loads instantly regardless of network conditions.

For dynamic data, the strategy is more nuanced. At ANED, we implement a stale-while-revalidate pattern for read operations: the application immediately displays cached data while simultaneously fetching fresh data from the server. If the fetch succeeds, the cache is updated and the UI reflects the new data with a smooth transition. If the fetch fails because the user is offline, the cached data remains visible and functional. For critical data that must be current, such as account balances or medication dosages in healthcare applications, we display clear indicators showing when the data was last synchronised, so users can make informed decisions about whether to trust the displayed values.

Sync-When-Connected: Handling Writes Offline

Handling read operations offline is comparatively simple. The real engineering challenge is handling writes: what happens when a user submits a form, creates a record, or updates data while offline? The naive approach of simply queuing operations and replaying them when connectivity returns sounds simple but introduces complex problems. What if two users edit the same record offline? What if the server state has changed between the time the user made the edit and the time the sync occurs? What if the queued operation is no longer valid because a prerequisite condition has changed?

At ANED, we have developed a conflict resolution framework that handles these scenarios systematically. Every offline mutation is stored in an IndexedDB queue with a timestamp, the user's identity, and a hash of the record state at the time of the edit. When connectivity returns, the sync engine processes the queue in order, comparing the expected state hash with the current server state. For non-conflicting changes, the sync is automatic and invisible to the user. For conflicts, the framework applies configurable resolution strategies: last-write-wins for low-stakes fields, merge for additive changes like comments, and manual resolution with a clear UI for critical conflicts. This approach, which we use across our custom software projects, means that users can work confidently offline knowing that their changes will not be lost and that conflicts will be handled gracefully.

Reducing Data Usage: Every Byte Counts

Offline-first architecture naturally reduces data usage because cached resources do not need to be re-downloaded. But deliberate data minimisation goes further. At ANED, we apply aggressive compression to every asset and API response. Images are served in WebP format with responsive srcset attributes, so a user on a mobile device downloads a 30-kilobyte thumbnail instead of a 2-megabyte full-resolution image. API responses use gzip or Brotli compression, reducing payload sizes by 70 to 90 percent. JSON responses are structured to include only the fields the client needs, avoiding the common anti-pattern of returning entire database records when the UI only displays a name and a status.

We also implement what we call data-conscious loading patterns. Initial page loads fetch only the data visible in the viewport. Additional data is loaded on scroll or user interaction, and each fetch is small and targeted. Background synchronisation of cached data happens on a schedule that respects the user's data constraints: more frequent syncs when on WiFi, less frequent on mobile data, and completely paused when the user activates a data saver mode that we include in every application. These patterns collectively reduce data consumption by 60 to 80 percent compared to conventional web application architectures, making the difference between an application that is affordable to use daily and one that users open once and abandon.

Progressive Web Apps: Native-Like Experience Without the App Store

Progressive Web Apps combine the best of web and native mobile applications, and they are particularly well-suited to African markets. A PWA can be installed on a user's home screen without going through an app store, eliminating the friction of large app downloads and the storage constraints of budget Android devices with limited internal memory. Once installed, a PWA with proper service worker implementation launches instantly, works offline, and can send push notifications. For users with devices that have only 8 or 16 gigabytes of storage, a PWA that occupies 2 megabytes versus a native app that requires 50 megabytes is not a minor advantage. It is the difference between having the app and not having it.

ANED builds every customer-facing web application as a PWA by default. Our PWA implementation includes a web app manifest that enables home screen installation, a comprehensive service worker that caches all critical assets and implements the offline data patterns described above, and a lightweight update mechanism that notifies users when a new version is available without forcing an immediate update that would consume data. We have seen PWA adoption rates that significantly exceed native app installation rates in markets where data costs are high and device storage is limited. For enterprises targeting the next billion users, PWAs are not a compromise. They are the optimal delivery mechanism, and offline-first architecture is what makes them work reliably in the real-world conditions that African users experience every day.