LocalStorage is not permanent. The storage is owned by the user, so the user can clear it if he wants. Other web applications cannot mess with it, but the user can clean or change them if they want - this is their data, just like the files belonging to a locally installed application are under the control of the computer user.
In addition, LocalStorage can be recycled when space is low.
You should think of LocalStorage as a long-term cache that usually stays in this particular browser on that particular computer, but will not always be there. Any truly persistent state should be stored on your own server.
If the user simply decides to switch to another browser (and even more so to a new computer), all local storage will look empty in the new browser.
jfriend00
source share