Home / Articles / Software
Software

When the Internet Goes Down, Work Doesn't Have to Stop: Understanding Offline-First Software

Many modern applications feel great when the connection is stable, but become frustrating when the internet slows down or disconnects. The offline-first approach tries to reverse that priority: work can still be done in the...

Saat Internet Putus, Kerja Tidak Harus Ikut Berhenti: Memahami Software Offline-First

An unstable internet connection can turn simple tasks into a series of waits: opening documents, saving changes, submitting forms, or just viewing your own notes. The problem isn't always with the speed of your laptop or phone, but with software that assumes the server must always be available.

This is where the term offline-first becomes important. Simply put, applications are designed so that their core functions continue to operate without the internet. The connection is used to sync data, fetch new information, or collaborate with others—not as a strict requirement for every click.

Offline-first is not just about caching pages

For websites or web applications, offline capability typically utilizes a service worker. This component operates between the application, the browser, and the network. It can store certain assets like HTML, CSS, JavaScript, or previously opened data, and then serve them when the network is unavailable. MDN documentation explains that a service worker can intercept network requests and determine whether the response is taken from the cache or the server.

However, an application that only displays old pages is not necessarily truly offline-first. Users may be able to open a list of notes, but not create new ones. More mature applications allow changes to be saved locally, marking them as unsynced, and then sending them when the connection is restored.

This distinction is important. Offline-capable means the application can still perform some tasks without the internet. Offline-first means the offline experience is treated as a normal condition that is designed from the start, not just an emergency state.

Local-first: primary data resides on the user's device

A related concept is local-first. This idea was popularized by Ink & Switch through principles of software that prioritize local storage, data ownership, speed, privacy, and the ability to work without a connection. In a traditional cloud model, the primary copy of data resides on the server. User devices are often treated as temporary places to access that copy.

In the local-first model, copies on laptops, tablets, or phones are treated as the primary source of work. Servers can still be used for syncing between devices and collaboration, but users do not have to wait for the server to view or change data they already possess.

Imagine a notebook that is always in your bag, rather than a book that can only be read when you are connected to the library. When the internet is available, its contents can be copied to other devices or shared with colleagues. But basic activities—writing, reading, and organizing notes—do not depend on a connection.

The benefits are felt in everyday situations

  • Travel and areas with poor signal. You can still read work materials, take meeting notes, or fill out field data without searching for Wi-Fi first.
  • Faster application responses. Opening local data usually does not require back-and-forth trips to the server. This can reduce loading screens for simple activities.
  • Lower risk of losing work. Changes saved on the device do not immediately disappear just because the network is disconnected.
  • Privacy is easier to control. For certain types of data, storing a local copy can reduce the need to send every change to external services.
  • Reduced dependency on a single service. This does not mean users are automatically free from vendor lock-in, but access to local data gives a stronger position when services change or encounter issues.

These benefits do not mean all applications should abandon the cloud. Real-time collaboration, cross-device backups, centralized analytics, and shared access still require servers. The question is: which parts should indeed wait for the internet, and which parts should be able to be done now?

The challenge lies in synchronization

Once two devices can change data separately, conflicts can arise. For example, you edit a customer's address from your laptop while offline, while a coworker changes the same address on the server. When both devices come back online, the software must determine how to merge those changes.

For complex documents or data, developers can use approaches like CRDT (Conflict-free Replicated Data Type), which is a data structure designed so that changes from multiple devices can be merged according to specific rules. However, CRDT is not a magic button. Data models, conflict views, user permissions, and recovery processes still need to be carefully designed.

From the user's perspective, signs of a well-designed application include:

  • clear synchronization status, such as “saved on device” or “waiting for connection”;
  • unsent changes are not hidden;
  • conflicts are explained in plain language, not just error codes;
  • options to export or recover data are available;
  • the application does not silently delete local changes.

What to check before relying on offline features

The label “offline-capable” often has different meanings. Before making an application your primary work tool, conduct simple testing.

  1. Open the application while online and ensure the necessary data is loaded.
  2. Disconnect Wi-Fi and cellular data.
  3. Try important tasks: creating documents, editing data, searching notes, or filling out forms.
  4. Close the application, reopen it, and check if the changes are still there.
  5. Turn on the connection and see if the data syncs without duplication or loss of content.
  6. Test from a second device if your work involves both a laptop and a phone.

Don’t forget to test under conditions of full storage, expired login sessions, and application updates. Software can still display an offline screen but fail to save data if the device runs out of space or credentials need to be updated.

What does it mean for us?

Offline-first is not an excuse to neglect backups. Local data can still be lost when devices are damaged, stolen, infected with malware, or reset. Precisely because some work occurs on devices, users need to understand storage locations, export methods, and recovery processes.

For personal use, choose software that provides clear access to local files or databases, has reasonable export options, and does not obscure synchronization status. For teams, agree on procedures when two people change the same data and determine who is responsible for checking conflicts.

For developers, the first step does not have to be building a complex collaboration system right away. Start with measurable targets: the application should still be accessible after the connection is lost, core work should be saved locally, synchronization status should be visible, and failed submissions should be retryable without creating duplicate data. MDN documentation on offline and background operations in PWAs can serve as a technical starting point, while the principles of local-first from Ink & Switch help view the issues from the perspective of ownership and user experience.

Good software does not make us constantly think about whether the internet is live. It saves work in sensible places, informs us what is safe, and explains what is still pending. Connection remains important, but it should not be the only reason our work can proceed.

Sources & further reading

– Rio Yotto @rioyotto