I am learning HTML, Javascript, etc., and decided to make a small web app on the Chrome Web Store as an educational project. The app stores a few bits of important data in localStorage (essentially small saved text files), and I was wondering if this implementation choice is too fragile. I know that the user will lose data if their hard drive dies or they manually delete it, but is the data in danger under normal circumstances? For example, does Chrome ever decide to clean out localStorage for maintenance reasons?
Thanks,
Alex
By default, Chrome deletes everything – including local storage – when you select “Clear Browsing Data”, which some users might do if they’re told to do something like “empty your browser’s cache” without realising the implications.
The HTML5 spec doesn’t specify anything with regards to the safety of data, possibly because it’s a very young draft. I’d play it on the safe side and store that data in the cloud as well – it’s what your users expect.