Is using localStorage() allowed?
I'm making a computer game in PJS and I would like to be able to use `localStorage()` to save the game state to the browser so that the user doesn't have to keep a save code somewhere. However, I've heard varying reports as to whether using `localStorage()` is allowed; the KA guidelines seem to forbid it universally, but I've heard programmers saying that this has changed and that it has been allowed again in certain instances. Is using this functionality an option?
If it makes any difference, the key I'm using is one which is very unlikely to be used by anyone else ("CZS_ArthorSaveCode"), and the user has to enable the use of `localStorage()` in the settings page before the program accesses it; the settings page also has a button allowing them to erase any data previously stored. The only data I'm storing is a single string of around 70 characters. I already wrote and tested all the code for this, but once I was finished I commented out everything that used `localStorage()`.
The link to the program is here: https://www.khanacademy.org/computer-programming/jungle-game-unfinished/4687028301086720
Thanks!
Please sign in to leave a comment.