mozilla / addon-recommendation-shield-study

Stand-alone verison of Add-on Recommendation for Shield Study
Mozilla Public License 2.0
3 stars 7 forks source link

User data is not persistent across browser restarts #7

Closed casebenton closed 8 years ago

casebenton commented 8 years ago

Will use sdk's simple storage to keep user data

raymak commented 8 years ago

I claim that simple-storage is fairly but not fully reliable. It has an interval for syncing the data with the disk and if you crash Firefox during that interval, you lose data. I haven't actually tested this yet, but you could.

casebenton commented 8 years ago

Is there a better way to store data across multiple sessions?

raymak commented 8 years ago

I've found indexeddb to be pretty good. And I wrote my (untested) own module to maintain an in-memory copy of the storage object (in hope of better performance) and a (untested) module to scope the database. By untested I mean there is no test code for it.

I think simple-storage would be good enough for your study though. Just know its limits.

casebenton commented 8 years ago

Ok. I'm using storage to keep track of which recommendations have been seen in case of a restart. It wouldn't be terrible if simple-storage failed. Users may just see some popups after they already marked that they don't want to see them again.