BROWSER DATA RESCUE / PROOF EDITION 0.1.0
Make “saved” mean something.
Hold a database upgrade. Watch a transaction fail. Restore a backup and compare every record.
Two real IndexedDB labs for frontend developers. Original synthetic notes only. No accounts, APIs or uploads. A learning tool, not a production database repair service.
Start a dedicated synthetic lab. Nothing is read or written until you choose a lab action.
The old tab
Open this connection before requesting v2 in the first tab. It deliberately ignores versionchange so you can observe the blocked event.
No connection held.
After closing it, return to the first tab. A pending upgrade should resume without starting a second request.
Start with three notes
New sessions retain older lab databases. This tool does not enumerate, delete or clear unrelated browser storage.
Who is holding the door?
- Start the synthetic lab.
- Open the old tab and choose “Hold old v1 connection”.
- Return here and request the upgrade.
- Observe BLOCKED, then close the old connection.
No upgrade requested.
What should happen?
The waiting request emits blocked. Closing the old tab’s connection lets its schema transaction finish. Version 2 adds a title index; the notes should remain unchanged. This is a connection coordination failure, not proof of data corruption.
oldConnection.onversionchange = () => {
oldConnection.close();
// Tell this tab that a newer app version is available.
};A successful put can still roll back.
These buttons edit the first synthetic note. The failing path deliberately aborts after its put request succeeds. It is an injected AbortError, not real quota exhaustion.
No save attempted.
The acknowledgment rule
transaction.oncomplete = () => showSaved(); transaction.onabort = () => keepDraftUnsaved();
Complete confirms this transaction. It does not promise indefinite retention or survival of sudden power loss.
Source records
No source connection.
Prove what came back.
Export, save the JSON outside the browser, then validate and restore into a new staging database. The original is never replaced by the restore action. SHA-256 detects changed content; it is not author authentication.
No retained backup.
Not validated. Source is unchanged.
No restore attempted.
Optional recoverable loss drill
Create a current backup first. This empties only the named synthetic notes store, after comparing it with the retained backup. Undo restores that exact copy while this page remains open. Closing/reloading this page loses the in-memory undo copy; keep the downloaded backup. This is not a deleted-database or browser-eviction experiment.
Browser event trail
Receipts describe observed actions in this session, not an independently certified recovery. No telemetry is sent.
The prepared eight-case casebook
This complete free proof is the first stage of an eight-case learning product. The eight-case PDF/EPUB casebook and companion are available as a digital download through Payhip. Native EPUB/Kindle rendering remains unverified. Free MDN documentation and Dexie export/import may already meet your needs.
Read the chapter, compare the alternatives and try the exercises →