Discuss Scratch
- ContourLines
-
Scratcher
500+ posts
Local Storage function
How do we know that this won't happen:Although, why are we arguing about it? Its pretty hard to find browser caches and the same could be done with variables, cloud variables, comments, ect…
“Download this, convert it to (some format), open it!!!!”
Some people are surprisingly gullible.
- ContourLines
-
Scratcher
500+ posts
Local Storage function
~snip~Scratch stores the current login data in localStorage, meaning that someone could access your login token.
You can't because your login token is encrypted and not stored directly into localStorage.
- codentag
-
Scratcher
100+ posts
Local Storage function
How do we know that this won't happen:
“Download this, convert it to (some format), open it!!!!”
Some people are surprisingly gullible.
Scratch stores the current login data in localStorage, meaning that someone could access your login token.
I disagree, and support this suggestion. As ContourLines said, letting users store data in players' localStorage barely poses as a security threat. Malware can't be transmitted through it, nor can downloadable files. With limitations put into place, the only risk I can think of comes from the game creator if they happen to share sensitive information. The storage is bound to the origin, unlike cookies (which Scratch uses to save login data, not localStorage) that are sent to the server with each request.
LocalStorage communicates with javascript - in the user's client, while cookies communicates with php, or other server-side languages, so you can love and favorite and comment all over scratch.
Last edited by codentag (May 24, 2020 11:45:59)
- LandonHarter
-
Scratcher
1000+ posts
Local Storage function
Big support! With this, you could make automated save files for games!
- CW_school
-
Scratcher
46 posts
Local Storage function
PixelYoshi, that topic is about cloud variables. I had created my own topic for browser storage July 15th '19 which goes into quite a bit of detail of using localStorage, sessionStorage, and cookies, although there are older duplicates with much less info
https://scratch.mit.edu/discuss/topic/357950/
https://scratch.mit.edu/discuss/topic/357950/
- CW_school
-
Scratcher
46 posts
Local Storage function
Duplicates:
https://scratch.mit.edu/discuss/topic/407191/ (May 23 '20)
https://scratch.mit.edu/discuss/topic/375763/ (Nov 11 '19)
https://scratch.mit.edu/discuss/topic/357950/ (Jul 15 '19)
https://scratch.mit.edu/discuss/topic/344259/ (Mar 16 '19)
PS:
Cookies arent server-side. They are client-side like localStorage. However, cookies have parameters that cna be defined, including “path” which makes it so the cookie cannot be changed other than from that path, and cookies can have expiration dates.
And yes, localStorage and cookies can be modified to “cheat” inside of games
https://scratch.mit.edu/discuss/topic/407191/ (May 23 '20)
https://scratch.mit.edu/discuss/topic/375763/ (Nov 11 '19)
https://scratch.mit.edu/discuss/topic/357950/ (Jul 15 '19)
https://scratch.mit.edu/discuss/topic/344259/ (Mar 16 '19)
PS:
Cookies arent server-side. They are client-side like localStorage. However, cookies have parameters that cna be defined, including “path” which makes it so the cookie cannot be changed other than from that path, and cookies can have expiration dates.
And yes, localStorage and cookies can be modified to “cheat” inside of games
Last edited by CW_school (July 7, 2020 04:43:02)
- CW_school
-
Scratcher
46 posts
Local Storage function
There are newer duplicates, but this is the oldest post ive found regarding the use of localstorage
Duplicates:
https://scratch.mit.edu/discuss/topic/407191/ (May 23 '20)
https://scratch.mit.edu/discuss/topic/375763/ (Nov 11 '19)
https://scratch.mit.edu/discuss/topic/357950/ (Jul 15 '19)
LocalStorage is completely different from cloud variables because with cloud variables, everyone has access to them, and there are limitations.
With localStorage many limitations are gone because the data is stored client side in the browser, and is unique to each user. However, localStorage can be cleared and modified at the users will, meaning cheating in games is possible, but thats up to the user.
Duplicates:
https://scratch.mit.edu/discuss/topic/407191/ (May 23 '20)
https://scratch.mit.edu/discuss/topic/375763/ (Nov 11 '19)
https://scratch.mit.edu/discuss/topic/357950/ (Jul 15 '19)
LocalStorage is completely different from cloud variables because with cloud variables, everyone has access to them, and there are limitations.
With localStorage many limitations are gone because the data is stored client side in the browser, and is unique to each user. However, localStorage can be cleared and modified at the users will, meaning cheating in games is possible, but thats up to the user.
Last edited by CW_school (July 7, 2020 04:09:32)
- whiteandblackcat
-
Scratcher
1000+ posts
Local Storage function
Duplicates:As this has the most discussion, I'll report for them to be merged
https://scratch.mit.edu/discuss/topic/407191/ (May 23 '20)
https://scratch.mit.edu/discuss/topic/375763/ (Nov 11 '19)
https://scratch.mit.edu/discuss/topic/357950/ (Jul 15 '19)
https://scratch.mit.edu/discuss/topic/344259/ (Mar 16 '19)
snip

- lukie6007
-
Scratcher
73 posts
Local Storage function
If the scratch team sees this I have a mockup:
There would be a localstorage extension and it would be like a cloud variable:
There would be a localstorage extension and it would be like a cloud variable:
set Local Storage to [foo]
change Local Storage by [foo]
delete Local Storage
- MagentaDude1359
-
Scratcher
100+ posts
Local Storage function
I support!
It would be really cool to implement saving and loading files in the local storage, though I do think the key being the project ID is also a good idea, maybe something like “For use with scratch project XXXXXX” in the file so you couldn’t hack into somebody’s computer!
It would be really cool to implement saving and loading files in the local storage, though I do think the key being the project ID is also a good idea, maybe something like “For use with scratch project XXXXXX” in the file so you couldn’t hack into somebody’s computer!
add [thing] to local storage as [name]
(get file [file name])
delete file [file name]
- website_builder
-
Scratcher
2 posts
Local Storage function
Here would be some interesting blocks:
SessionStorage is like localstorage but gets deleted when you close the tab.
So Here are my ideas. LocalStorage and Sessionstorage are preset; You can make a new JSON by making a variable.
which will delete all JSONs EXCEPT SessionStorage and LocalStorage.
add key [personalbest] to JSON [LocalStorage v]
add value [69420] to key [personalbest v] in JSON [LocalStorage v]
delete all of JSON [LocalStorage v]
delete key [personalbest v] from JSON [LocalStorage v]
(retrieve value of key [personalbest v] is JSON [LocalStorage v])
(list all keys of JSON [LocalStorage v])
SessionStorage is like localstorage but gets deleted when you close the tab.
add key [quicksave] to JSON [SessionStorage v]
add value [69420] to key [quicksave v] in JSON [SessionStorage v]
delete all of JSON [SessionStorage v]
delete key [quicksave v] from JSON [SessionStorage v]
(retrieve value of key [quicksave v] is JSON [SessionStorage v])
(key (1) of JSON [SessionStorage v])
So Here are my ideas. LocalStorage and Sessionstorage are preset; You can make a new JSON by making a variable.
set [newJSONvar v] to (makeJSON:[{key: value}])Don't worry: after you make the variable you never have to use it again. But if you do it says the text of normal JSON. You can also have delete all JSONs
which will delete all JSONs EXCEPT SessionStorage and LocalStorage.
define EntityRedstone
say [he likes minecraft]
set [does he like reading?] to [yes]
broadcast [he really likes to code JavaScript v]
ask [But do I like Scratch? (Hint: Yes :D )] and wait
set [☁something else about me v] to (join [He just became a scratcher and is now always using] (☁ cloud variables))
see my latest project: [url=https://turbowarp.org/720094402/fullscreen] Just be patient...
Last edited by website_builder (Aug. 7, 2022 19:07:19)







