Optimistic UI
Apply the change immediately and reconcile with the server afterwards, so the interface never waits on the network.
Definition
Optimistic UI updates local state as soon as the user acts, assuming success, then reconciles when the server responds. If the operation fails, the change is reverted visibly and the reason explained.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this plate
Reach for this when
- Frequent low-risk operations.
- Direct manipulation interactions.
- Products that must work on unreliable connections.
- A frequent, low-risk action would otherwise wait on a network round trip.
Common mistakes
- Optimism applied to operations that genuinely fail often.
- Silent reverts.
- No retry path.
When it is appropriate
- The operation almost always succeeds.
- Failure is recoverable and the revert is easy to understand.
- The user can tolerate a brief inconsistency.
- Good candidates: likes, toggles, reordering, adding a tag, marking as read.
- Bad candidates: payments, irreversible deletions, anything where the user will act on the assumed result before it is confirmed.
Being optimistic honestly
Do
- Apply it where failure is rare and the correction is cheap.
- Keep the correction visible: say what failed, and restore the previous state clearly.
- Preserve the reader's input so a retry costs nothing.
- Keep an eye on how often the optimism is wrong, which is a reliability signal.
Do not
- Use it for payments, or anything else that must be true before it is shown.
- Revert silently, which leaves the reader believing something happened.
- Queue dozens of optimistic changes with no way to see which have landed.
- Show success styling for a state that has not been confirmed.
Operation by operation
| Operation | Show it immediately? | Because |
|---|---|---|
| Like, star, follow, mark as read | Yes | Failure is rare, the revert is one element, and nobody acts on the result. |
| Reordering a list, moving a card | Yes | The reader is mid-gesture and any latency reads as the interface not responding. |
| Sending a message | Yes, marked as pending | The message appears, with a state that changes to sent or failed. Never a silent disappearance. |
| Uploading a file | Partly | Show the row and its progress, but not a completed state until the server has it. |
| Deleting something | Only with real undo behind it | An optimistic delete that fails has to put the item back exactly where it was, in view. |
| Payments, bookings, anything scarce | No | The reader will act on a success that has not happened, and the correction arrives too late to help. |
Designing the failure path first
Optimistic UI is entirely a question of what happens on the rare occasion you were wrong.
- 1
Keep the previous state
You cannot restore what you did not retain. Hold it until the server confirms.
- 2
Mark the change as pending
Subtly, but visibly, so a reader watching closely can tell confirmed from assumed.
- 3
Restore in place on failure
Put the item back where it was, in view, rather than on a screen the reader has since left.
- 4
Say what happened and offer retry
A persistent message naming the action that failed, with the reader's input preserved so retrying costs nothing.
- 5
Measure how often you are wrong
A rising rollback rate is a reliability signal, and the point at which optimism stops being honest.
The branch that decides whether to be optimistic
In practice
- i.
Optimistic reordering
Task toolsDrag-and-drop reordering that waits for a server round trip feels broken. Applying the move immediately and reconciling in the background is the only acceptable behaviour for direct manipulation.
- ii.
The like that came back
Silent revertA like applied instantly, failed on the server and quietly reverted. The reader saw it work, and later saw it undone with no explanation, which reads as the product losing their action.
Local chart
PAT·013 · Region III · Grid E1
This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Applies when you are designing
Principles behind this
The reasoning this solution is an application of.
- Help Users Recognise, Diagnose and Recover From ErrorsHEUR·009 · Heuristic
- Visibility of System StatusHEUR·001 · Heuristic
- Doherty ThresholdLAW·006 · Law
Optimistic updates are how a network round trip stays under the threshold that keeps attention.
- FeedbackPRIN·004 · Principle
- ForgivenessPRIN·006 · Principle
- FlowPSY·005 · Psychology
- Performance as User ExperienceFND·054 · UI foundation
Often used with
These usually appear in the same screen or the same decision.
- Toggle SwitchCMP·007 · Component
Alternative approach
A different answer to the same problem, with a different cost.
- Loading StatesPAT·011 · Pattern
Optimistic UI removes the wait instead of decorating it, and pays for it in rollback complexity.
Practical example
A worked decision where this was the deciding factor.
- Designing an AI Suggestion Feature People Would UseCASE·010 · Case study
Short definition
The one-paragraph version, for when that is all you need.
- Graceful DegradationTERM·121 · Term
- Interaction DesignTERM·034 · Term
- Interaction to Next PaintTERM·126 · Term
- Optimistic UITERM·051 · Term
- Perceived PerformanceTERM·127 · Term