Storage and persistence
Each project is saved to the browser’s Origin Private File System a moment after you stop typing, and when you switch away from the tab. The demo, every example, every GitHub repo and every share link is its own project with its own saved copy.
node_modulesand.gitaren’t saved; dependencies are installed again when you open the project.bun:sqlitefile databases are saved with the project.- When you reopen a project, your saved files win over its source.
resetin the console throws them away. - Only one tab saves a project. A second tab with the same project warns that its changes won’t be kept.
- If the browser has no Origin Private File System, the playground warns that nothing will be kept across reloads.
How long it stays
Section titled “How long it stays”The playground asks the browser to keep its storage (navigator.storage.persist()). In Chrome, projects sit in their own storage bucket, kept apart from other site data. Browsers can still clear them, for example when the disk is nearly full or when you clear site data, and Safari clears a site’s storage after seven days without a visit.
Install the playground to make its storage last longer: in Chrome or Edge, use the install button in the address bar; in Safari, File → Add to Dock (on iPhone and iPad, Share → Add to Home Screen). Safari doesn’t apply the seven-day limit to web apps added this way.
To keep a copy of a project, use Download as zip in the Share menu and open it again with Zip file… in the project picker. A share link or a push to GitHub works too.