Menu

Post image 1
Post image 2
1 / 2
0

Gnoke SaveNative: A Durability Layer for the File System Access API on Mobile Browsers

DEV Community·Ekong Ikpe·about 1 month ago
#DkrPqVjO
Reading 0:00
15s threshold

I was building offline-first apps for the Gnoke Suite and ran into the same wall every time. The File System Access API works beautifully — until your phone decides otherwise. A background OS kill. A tab reload at the wrong moment. Ten concurrent writes racing for the same stream. Any of these silently drops your data. No error. No warning. Just gone. The browser fantasy is: pick a folder, write files, done. The mobile reality is: your process dies, your handle goes stale, and your writable stream errors out mid-write. 😬 So I built a survival layer around it. Meet gnoke-savenative A two-layer write pipeline for browser apps. Native filesystem first, IndexedDB shelf as instant fallback. npm install gnoke-savenative Enter fullscreen mode Exit fullscreen mode import { saveNative } from ' gnoke-savenative ' ; import { openDB } from ' idb ' ; // Mount once (user gesture required) const handle = await saveNative . mount ( openDB ); let workspace = { handle , db : await saveNative .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More