We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Web Content Delivery
Free preview: the first 2 parts of this 10-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Web Content Delivery
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
You open Notion on the subway. No signal. You edit a page, create a new task, reorganize a database view. Everything responds instantly. Zero spinners, zero errors, zero "you are offline" banners.
Twenty minutes later you surface and reconnect. Every change syncs to the server within seconds. Your teammate, who edited the same page while you were underground, sees their changes merged with yours automatically. No conflicts lost, no manual resolution needed.
This is offline-first architecture. The app treats the local device as the source of truth. Every read comes from local storage. Every write goes to local storage first. The network is a background synchronization channel, not a prerequisite for using the app. If the network is available, sync happens immediately. If not, sync happens later. The user experience is identical either way.
Most web apps are online-first. They assume the network is always available. Click a button, the app sends a request to the server, waits for the response, then updates the UI. If the network is gone, the button either does nothing or shows an error.
Offline-first flips this completely:
| Aspect | Online-First | Offline-First |
|---|---|---|
| Source of truth | Server | Local store |
| Where writes go first | Server | Local store, then sync |
| UI responsiveness | Depends on network | Always instant |
| Offline experience | Broken or read-only | Fully functional |
| Sync complexity | Low (server is always right) | High (conflict resolution needed) |
| Cost | Less engineering time | More upfront engineering, less infra load |
The key trade-off: Online-first is simpler to build. Offline-first gives a better user experience but forces you to solve data synchronization and conflict resolution.
Linear, the project tracker, is offline-first. Every action is instant because it writes to a local SQLite database (via wa-sqlite in the browser). The sync engine pushes changes to the server in the background. This is why Linear feels faster than every competitor, including those with better servers.