Optimistic updates

Showing a result before the server confirms it feels fast, but sometimes it tells people something happened that did not.

Liking a post fills the heart at once. When the server rejects it, the heart and the count go back to how they were and a message says it failed, with a Try again link.

The answer

Show results early only for small, reversible actions. Wait for the server for anything that matters. As strong as the weakest rule behind it: weak.

  • Show the result before the server confirms only when the action almost always works, is easy to undo, and people’s next step doesn’t depend on it.
  • Wait for the server before showing success for payments, security changes, legal actions and anything that can’t be undone.

The other rules

  • If an error message appears without moving focus, make sure screen readers announce it.
  • If the server rejects the action, restore the earlier state, say what failed, and offer Try again.
  • Mark new items as pending until the server confirms. Leave simple toggles unmarked.
  • When someone else’s change conflicts, show the server’s value and say this person’s change wasn’t saved.

Accessibility

Open questions

  • OpenDoes optimistic display change use, errors or trust compared with a short wait? No study found.
  • OpenHow often can an optimistic update fail before people stop trusting it?
  • OpenHow should conflicts with other users be shown?
Checked November 12, 2026

Sources