Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Any turbowarp users? Question about exporting with local storage cloud data.
- NMario84
-
Scratcher
1000+ posts
Any turbowarp users? Question about exporting with local storage cloud data.
I was doing some testing, and exported a project as HTML with cloud data with local storage option. I was wondering WHERE does this local storage go into your PC? For example, if I need to remove to change something about this storage data for this project, where can I find this?
- ZZC12345
-
Scratcher
500+ posts
Any turbowarp users? Question about exporting with local storage cloud data.
Local storage is a web technology that is similar to cookies in the sense that it stores data on the user's device. The browser is in charge of figuring out where to put this text (key-value pairs) on your computer, and it varies across browsers and operating systems. Usually, it's stored in a database file in a user-specific app data folder. For Chrome on Windows, it's stored at
Figure 1: The location of Google Chrome's default profile's local storage databases.
You seem to be using Microsoft Edge on Windows (from your user agent, which is available publicly on projects you've edited), which is also Chromium-based (it's the same software but modified a lot). This suggests that it would be in a similar location.
However, those files are binary database files and there's an easier way.
Go to the exported file's HTML page. Press F12 (or Menu > More tools > Developer tools) to open the JS developer console. Find the “Application” tab on the top strip (you may have to use the >> icon), then click the arrow to the left of the words “Local Storage” on the left menu. Click “file
/”; all webpages served from the filesystem are treated as under the “file
/” origin (though CORS still applies). You can then see the key-value pairs that Turbowarp stores; the key is called “cloudvariables:{project id}” and is stored in Developer Tools.

I had made a very nice visual above, but when I posted originally, apparently some of the UTF-16 emojis in my ASCIIArt messed up DjangoBB (the entire forum page's styling got messed up. I posted a screenshot of Notepad instead…
Anyway, the value is a JSON string
and you can edit it by double-clicking the value cell (in DevTools).
(and for good measure, here's the screenshot of the DjangoBB bug

%LocalAppData%\Google\Chrome\User Data\Default\Local Storage
You seem to be using Microsoft Edge on Windows (from your user agent, which is available publicly on projects you've edited), which is also Chromium-based (it's the same software but modified a lot). This suggests that it would be in a similar location.
However, those files are binary database files and there's an easier way.
Go to the exported file's HTML page. Press F12 (or Menu > More tools > Developer tools) to open the JS developer console. Find the “Application” tab on the top strip (you may have to use the >> icon), then click the arrow to the left of the words “Local Storage” on the left menu. Click “file
/”; all webpages served from the filesystem are treated as under the “file
/” origin (though CORS still applies). You can then see the key-value pairs that Turbowarp stores; the key is called “cloudvariables:{project id}” and is stored in Developer Tools.
I had made a very nice visual above, but when I posted originally, apparently some of the UTF-16 emojis in my ASCIIArt messed up DjangoBB (the entire forum page's styling got messed up. I posted a screenshot of Notepad instead…

Anyway, the value is a JSON string
{"☁ my variable":"my value"}
(and for good measure, here's the screenshot of the DjangoBB bug


Last edited by ZZC12345 (Oct. 5, 2022 11:43:28)
- NMario84
-
Scratcher
1000+ posts
Any turbowarp users? Question about exporting with local storage cloud data.
I don't know if this helps me much. Say for example that the HTML file created with turbowarp is named testscratchgame.html, I open this with firefox. The cloud data is saved there. However, if I rename this project file to something like test2scratchproject.html, it seems to make brand new cloud data for this specific file name. So I think something is going on here?
Last edited by NMario84 (Oct. 5, 2022 18:07:17)
- GarboMuffin
-
Scratcher
58 posts
Any turbowarp users? Question about exporting with local storage cloud data.
To be clear, the HTML file uses “local storage” to ask your browser to fetch and store the data for us. The HTML file itself does not (and can not) store the data in itself.
As a security measure, your browser may give each HTML file you open from local files a separate storage space, so if you rename the file, the browser may not let us access the data from the old name. Browsers often differ in their behavior on this. You should be able to fix that by putting your file on a website or using the native app environments.
As a security measure, your browser may give each HTML file you open from local files a separate storage space, so if you rename the file, the browser may not let us access the data from the old name. Browsers often differ in their behavior on this. You should be able to fix that by putting your file on a website or using the native app environments.
- NMario84
-
Scratcher
1000+ posts
Any turbowarp users? Question about exporting with local storage cloud data.
Alright, but I was thinking if there was some way to manage these local storage data somehow. In other words, maybe perhaps delete this data and restore the cloud data of the said scratch project back to the default setting? I was trying to look around my scratch program folder (just in case cloud data was being stored somewhere there as local data), as well as my firefox browser folder, but I didn't find anything obvious.
- Discussion Forums
- » Advanced Topics
-
» Any turbowarp users? Question about exporting with local storage cloud data.