Hacker News new | ask | show | jobs
by olijka 2958 days ago
Do you have any requirements for offline data storage for your PWA? If yes, how do you manage it? From what I've heard the amount of space available for data varies wildly between devices. In that case what does your offline data storage strategy look like?
1 comments

We use indexeddb, which is generally okay, but you're right, the DB size can vary across browsers (I think some limit to 10mb, and others to half the HDD). For our use case, it was good enough. Our strategy is to try and cache things offline, but if indexeddb fails to store the data, we attempt to fetch from the server. As the saying goes, cache invalidation is hard, but that's true regardless of the platform.