Post

Creating a Great Offline Experience, Part 1: Perceived Performance

Creating a Great Offline Experience, Part 1: Perceived Performance

Creating a great offline app experience is more than just making your app work without an internet connection. It’s about making the user forget they ever needed one in the first place.

The offline experience shouldn’t be an error state. It should be a core part of your app.

My background is in building desktop software at Sublime HQ, where every app is designed to work in these conditions. For the better part of a decade, I’ve been immersed in a world where reliability and instant performance are expected. At the same time, I have used countless web and mobile apps that work well in the right conditions, but are fragile and frustrating in poor network conditions.

In this series, I’ll talk about the principles I’ve learned that turn a functional offline app into a great one.

So, where do we begin? We start with the most fundamental challenge: an offline app, by definition, cannot wait for a server. This is why the first and most critical principle isn’t about data storage, but about performance. Specifically, making your app feel instant, even when the network is unreliable.


Perceived Performance

Think about what happens when a traditional app hits a patchy connection: you click a button, and the UI is stuck waiting for a response from the server that might never come. This is the user experience we have to eliminate. A great offline-first app remains interactive and useful regardless of network conditions. Decoupling the UI from the network is absolutely essential. It’s what prevents the app from getting stuck or erroring out.

The most powerful principle I’ve found for addressing this is operation prediction, sometimes called an optimistic UI. The principle is simple but hugely impactful: assume the user’s action will succeed at some point.

Here’s a short tour showing how this works with a common example: creating a new document.

On the left: an app that relies on a network connection. On the right: an app that predicts the server response.

In a traditional web app, hitting ‘Create’ starts a waiting game. spinner appears while the app talks to the server. If the network is slow or unavailable, you’re stuck, unable to interact with your new document until the server responds.

But we already know the end result: the editor should open so the user can start writing. So why wait? We can predict this outcome and optimistically open the new document locally, right away. From the user’s perspective, the action was instantaneous. They can begin working immediately, trusting the app to sync the document with the server as soon as the connection is available.

From an engineering perspective, this means the app is no longer just displaying raw server data. It’s managing a local cache of the last known server state, plus a queue of pending operations and their predicted results. The queue is critical, as each subsequent operation will be based on this predicted state, not the server state. The UI is built to render this predicted state instantly, which is the key to its responsive feel.

When a pending operation fails to sync, the app needs a clear strategy:

  • Retry automatically: For transient network failures, this is often the ideal path.
  • Roll back the change: For hard failures, like a data conflict, the app must revert the optimistic update and notify the user.

This principle shouldn’t be a special case; it should be the default for nearly every user action. While it’s foundational for any offline app, the result is a better experience for everyone. The truth is, every network has latency. A user on the fastest connection can still feel the difference between an app that waits and an app that responds instantly. When you stop distinguishing between online and offline, the end result is a better app.


Just the Beginning

The principle of operation prediction puts the user’s experience first, rather than the network.

But prediction is just one piece of the puzzle. I’d be interested to hear your thoughts on this approach.

Next, we’ll look at another area I believe is critical for great offline experiences: platform conventions.

This post is licensed under CC BY 4.0 by the author.

© Dylan Johnston. Some rights reserved.