from Hacker News

The building blocks of offline support

by pketh on 1/22/24, 6:00 PM with 30 comments

  • by jamestanderson on 1/23/24, 4:40 PM

    It's really cool to see offline support done well. It can be very frustrating when it's done poorly, or not offered at all.

    One of my biggest gripes with the Spotify app is the poor offline support, at least in my experience on Android. I have the bulk of my library downloaded for offline listening, so when I have a spotty network connection like when I'm on the Subway, I'd expect that I can still easily access at least my downloaded songs. Not the case. Spotify, it seems, won't use its local cache until it's thoroughly convinced you're offline, which may take several minutes of waiting for requests to time out. Once Spotify is convinced I'm offline, my downloaded songs will then finally load normally.

    My guess is that instead of doing it the way the Kinopio does - by reading from the local cache before fetching the remote data - Spotify does it the other way around.

    Anyway, nicely done!

  • by tmikaeld on 1/23/24, 8:13 AM

    This is really impressive and I like the app, it's fast and powerful.

    However, I wouldn't consider using it without better undo, if i merge a set of cards by mistake it cannot be undone. Maybe store a larger undo history in IndexedDB?

  • by tussa on 1/23/24, 9:24 AM

    It conveniently doesn't mention the hardest part: conflicts.

    If you just drop a conflicting edit then it's a stretch to call your app "offline". Yes, it "works" but who wants to use an application to at drops you edits?

  • by jiehong on 1/23/24, 10:36 AM

    That first load time was pretty long, though (like 4 seconds).

    Felt as if it checked online or loaded too many things.