The 4.5 MB Problem: How We Handle Browser Storage Limits
xNotePadAI stores your notes in your browser's localStorage — private by design. But localStorage has a hard limit: approximately 4.5 MB. Here's how we work within that constraint without compromising your privacy.
Why localStorage?
Most note apps store your data on their servers. That's convenient — unlimited storage, sync across devices, no limits. But it means they can read your notes, train AI on them, sell insights from them, or lose them in a data breach.
xNotePadAI takes the opposite approach: your notes live in your browser's localStorage. The server never sees your content. This is the foundation of our zero-knowledge architecture.
The trade-off: localStorage is capped at approximately 4.5 MB per origin across all major browsers. That's roughly 450–4,500 notes depending on size.
What 4.5 MB Actually Means
Short notes (1 KB each)
~4,500 notes — quick thoughts, tasks, snippets
Medium notes (5 KB each)
~900 notes — meeting notes, journal entries
Long notes (10 KB each)
~450 notes — research, essays, documentation
Version history overhead
5 versions per note adds ~40% to storage
For most users writing personal notes, this is plenty. But power users with hundreds of long-form notes will eventually hit the wall.
Our Strategies
1. Compression on Archives
When you archive a note, we compress it using LZ-String before storing. Archived notes typically compress 60–70%, effectively tripling your archive capacity. Active notes stay uncompressed for instant access.
2. Auto-Archive by Date
Set an auto-archive date on any note. When that date arrives, the note moves to compressed archive storage automatically. Old notes you rarely access stop consuming premium space.
3. Smart Expiry
Notes can have expiry dates (1 hour to 30 days, or a specific date). Expired notes get archived or deleted based on your preference — preventing abandoned notes from accumulating.
4. Version Pruning
We keep only the last 5 versions of each note. Older versions are discarded to prevent version history from consuming more space than the notes themselves.
5. Storage Monitoring
The sidebar shows your current storage usage. A warning appears at 90% capacity so you can archive or export notes before hitting the limit.
6. Export as Escape Hatch
One-click export downloads all your notes as individual files. If you're approaching the limit, export older notes to your filesystem, then archive or delete them from the app.
What About IndexedDB?
IndexedDB offers 250 MB+ of client-side storage — still private, still in your browser, still zero-knowledge. It's the natural next step for xNotePadAI.
The migration path: notes move from localStorage (4.5 MB) to IndexedDB (250 MB+) while maintaining the same privacy guarantees. No server involved. Your notes stay in your browser.
This is on our roadmap. When it ships, the 4.5 MB constraint disappears entirely — but the privacy model stays identical.
Why Not Just Use the Server?
We could easily store notes on Cloudflare D1 and give you unlimited space. But that breaks the privacy promise:
- • Server storage means someone else holds your data
- • Even encrypted server storage requires trusting key management
- • Server-side means vulnerability to data breaches, subpoenas, employee access
- • "Zero-knowledge" means nothing if the server stores the content
We chose the harder path: client-side storage with its limits, rather than server storage with its risks. The 4.5 MB constraint is the price of genuine privacy.
Optional Encrypted Sync
For users who want multi-device access, we offer encrypted sync — notes are encrypted with AES-256-GCM in your browser before transmission. The server stores only ciphertext it cannot decrypt. This is opt-in and separate from the core privacy model.
Even with sync enabled, the server cannot read your notes. The encryption key never leaves your browser.
Practical Tips
- Archive old notes — they compress to 1/3 their size
- Use auto-archive dates — set them on meeting notes and temporary content
- Export regularly — download your Recovery Kit as a backup
- Use tags over long titles — tags are shorter, more searchable
- Delete empty or test notes — they still consume metadata space
- Watch the storage bar — in Settings, shows current usage
Privacy has constraints. We work within them.
4.5 MB of private storage is better than unlimited storage someone else controls.
Try xNotePadAI Free →