Localstorage questions

Hello, i’m reading about the localstorage and i have a couple of questions:
1 localstorage save the data into the browser cache, so if i change browers or pc the progress will not be recovered? (i guess yes data will not be recovered)
2 if i use a program like ccleaner the data will be lost? (i guess yes)

LocalStorage is relative to the page being visited and the browser. It is very “local” :slight_smile: Normally you would use it to save things like login details or a unique key or something that could be used to quickly retrieve data from a server. LocalStorage will certainly be deleted by cleaning - also on devices with limited memory (like phones) it just doesn’t work if the device is very short of RAM (the calls to setItem will throw exceptions).

Let’s see the glass half full instead half empty, it’s not so ‘local’ if you move the laptop in another room it still works lol
The saved data like ‘localstorage.gamexyz’ can be used by 2 different projects?(on the same pc of course)

Not if they are different web pages… One of those cases of being able to do something with an owner window with iFrames, the parent could then host different projects and provide an interface to get the items from storage. A similar thing can also work embedding an iFrame in a page with a common URL. These must be served from the same domain however.

Actually on reflection - you can get it to work with a window from a different domain but you have to use message passing as an api to get the values.