jmoenig/Snap

Use IndexedDB for alternative project saving

Opened this issue · 1 comments

There is IndexedDB, which can be used to store stuff in the browser without a very small size limit. It's also a javascript-like database so it can store even more than just projects in a way that is easier to work with (for the most part) than browser storage. This could be very useful for users who don't want to get an account, or at least useful for snap forks (without the snap cloud).

Here's the documentation
https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

I've also implemented it in my snap mod, so you can see an implementation in action. The only reason I'm not making a pull request is because I think a discussion about how this should be implemented is a good idea.

I'm not sure if browser storage is a great idea today. I have seen people "lose" projects because it's not clear where they are saved.

The discussions to deprecate local storage are not really just about the size limits but the fact that it's too easy for students to lose work. Need to "clear cookies"? It's too easy to blow everything away. Or in student computers that periodically reset system data stuff like this can get lost.

Easy local/offline storage is definitely desirable but I think we need to pay attention to the design needs of the whole system