'LocalStorage JS - is it safe to store data to keep persistent after refreshing the page?

Question if I store something that is not related to the user but more for displaying some data and keeping them persistent. is it still unsafe?

For example, I have some suggested locations and each of them is a button with the name of that location. The user can choose which locations to go to.

Please, let me know your thoughts.



Solution 1:[1]

Yes. Its a good place to store some persist data, but if you need store some secure use session storage or additional encryption for your sensitive data.

Also you could use storage like indexdb for queries or abstraction over filesystem to store some large

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 siavolt