DEV Community

Vigor Guy
Vigor Guy

Posted on

What it takes to make a notepad open in under a second

Disclosure: I built the notepad this article is about — Outsmart Notes. It comes up once, at the end, because the lessons below come from building it.

Ideas do not wait for software. A thought arrives while you are walking to the kitchen or halfway through a meeting, and it has about ten seconds before it dissolves. A notepad's job is to be faster than forgetting — and most notes apps fail that test before you have typed a word. They load, then sync, then ask you to pick a notebook, a template, a workspace. By the time you are ready, the idea has started to fade.

Here is what I learned making a notepad that opens in under a second, every time — on good Wi-Fi, bad Wi-Fi, and no Wi-Fi at all.

1. Don't make the user wait for the server

The single biggest delay in most web apps is the round trip: load the page, ask the server who you are, fetch your data, then finally let you type. A notepad can skip almost all of that. Our notes live in the browser first, in IndexedDB, so the editor can render and accept typing before any network request has finished — or even started. There is no spinner between the thought and the cursor.

The trade-off is honest and worth stating: local-first means your notes live on that device and browser until you choose to sync them. If you clear browser data, local-only notes go with it. That is the price of instant, and it is better than the alternative — a notepad that fails exactly when you need it, on a plane or in a dead zone.

2. Leave the framework out

Our editor is plain JavaScript with no framework. That is a deliberate choice, not nostalgia. Every framework is a download, a parse, and a runtime standing between the user and a blinking cursor. For a page whose entire job is "show a text box, fast", the framework is pure overhead.

Plain JS has a cost too: you write more of the plumbing yourself, and there is no ecosystem to lean on for every small problem. For a notepad, that is a fair trade. The plumbing is small — a textarea, an IndexedDB store, a service worker — and the payoff is a page that needs almost nothing before it works.

3. Save without interrupting

Autosave sounds simple until you think about what it does to typing. Save on every keystroke and you make the browser write to disk while the user is mid-word. Throttle it too aggressively and a crash loses the last sentence. Our compromise: save the current note locally after a short pause in typing, and keep a lightweight in-memory copy of the very latest state so a crash mid-save still recovers cleanly.

Saving is a background job, not a user event. There is no save button, no "saving…" indicator fighting for attention, and no modal that stops you mid-thought to ask whether you want to keep changes. The app should feel like paper: your words are simply there when you come back.

4. Make it work offline on purpose, not by accident

Offline support is often treated as a fallback. For a notepad it should be the default mode: the app works exactly the same with no connection, because it never needed one to open, type, or save. A service worker caches the page and its assets on first visit, and the notes already live in IndexedDB on the device.

That changes how you think about sync. Sync becomes a quiet background job that merges changes when a connection appears — never a gate in front of the editor. If it fails, nothing breaks; the notes are already safe locally, and the sync can retry later.

5. Capture first, organise later

Speed is not only load time. Once the page is open, every extra decision is friction: pick a notebook, pick a colour, add tags, choose a template. Each one costs a second and a little of the thought. A fast notepad opens to a blank note, ready to type, and nothing else.

Organisation still matters, but it can wait until after the idea is safe. Search and links between notes do the organising work later, when you have time to think — not in the ten seconds when the idea is still arriving.

The test that matters

Forget feature lists. There is one honest test for a notepad: the next time an idea arrives, how long before you have typed it? If that test takes longer than a second, every other feature is decoration. Build for the open, and the rest follows.

The notepad I built from these lessons is Outsmart Notes — https://outsmartnotes.com — and the test above is the one I would invite anyone to run on it, or on whatever they use now.

Top comments (0)