Seems to omit the ability of a service worker to create and cache files. Not really valid as a database, which this article understandably focuses on. But it is another way to maintain files between sessions and offers the ability to access them by url as if they were on the same server. I have used it to load a zip file in the service worker and then serve the contents as if it were a file system on the server.
For cachekv I was trying not to use IndexedDB because the API sucks and localStorage has space limitations that I wanted to get around so I started using the `caches` browser API to store arbitrary data.
How does your example work? I'm asking because I'd like to do that instead, maybe.
10 comments
[ 3.1 ms ] story [ 27.6 ms ] threadOS: Windows 11 22H2 / Browser: Opera, FireFox, Edge
Screen: 1366x720 (32in TV)
If I move it to 1440x900 27in monitor, it doesn't do it.
I hacked this kv together with the browser's cache API: https://github.com/evbogue/bogbookv4/blob/master/lib/cachekv... which I secretly feel is not the best idea in the world but it works.
Service worker is only present for a web page.
How does your example work? I'm asking because I'd like to do that instead, maybe.