Posted April 25, 2022 by TurdBoomerang
Saving and loading are now also supported in the itch desktop app.
I did some research, and it turns out that the itch desktop app downloads the HTML and javascript files, and runs them locally, (rather than from the server.) This allows you to play your downloaded games even when offline.
The template can now detect whether the user is playing via server or locally, (but storing and then retrieving a test cookie.) If the user is local, the game will populate some additional save/load buttons to the page, which can allow the user to manually download/upload a save file. The server-based autosave is more convenient, but this is the tradeoff when developing mobile/web/local-compatible apps with vanilla js.