Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I made a PWA that used IndexedDB and base64 photos. I ran into a funky max-length issue that was an error from Chromium kind of interesting. But yeah the main problem I had was the base64 images would get too big (if you had too many to load) and then you would see a slower render vs. an image pulled by url.

Still pretty cool since I'm not a native developer and RN is something I've dabbled in but don't use daily.



These days IndexedDB supports storing binary blobs as File objects or even ArrayBuffers; the relevant bug on the Chrome issue tracker was marked fixed in 2014: https://bugs.chromium.org/p/chromium/issues/detail?id=108012


Interesting I think was straight up using just text or whatever is the default. Though I was using the Dexie wrapper which is nice.

To be clear I don't know if the bug was from IndexedDB it was something about length exceeded.

I did try to use small images too eg. some 150px by 150px but going to base64 usually multiplies the size by 1.3

For anyone interested [1] not a phenomenal app but one I poured idk 2-300+hrs into (was working on an RN version too) and went nowhere sucks. I was contributing to one of those codefor# deals.

[1] https://github.com/codeforkansascity/tagging-tracker-alt-app...


Perhaps Service Workers is better than IDB for that?


I'll keep it in mind. I used creat-react-app and the built in way to do PWA, although they did update that so I had to do some code updates... some Box thing I forget. (to get cached files to work)

Still it's cool to store everything as text/blobs locally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: