SheepTester / htmlifier

The HTMLifier "converts" Scratch 3.0 projects to an HTML file by putting all the project data and the entire Scratch engine into one enormous file
https://sheeptester.github.io/htmlifier/
MIT License
166 stars 78 forks source link

Add to Home Screen (progressive web app) functionality #131

Open avodonosov opened 2 years ago

avodonosov commented 2 years ago

Idea.

It may be good to have an option to include the "Add to Home screen" functionality into the generated HTML, so that mobile users can "install" the project.

https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen

SheepTester commented 2 years ago

This cannot be added to an HTML file I think; it'll have to require the zip option since the manifest file has to be separate

avodonosov commented 2 years ago

Yes, the single file won't work. Only .zip bundles.

BTW, another useful option could be to use Service Worker to cache the app assets, so the apb can work offline (as done in the Add to Home screen documentation link above). It would probably be useful both for the Add to Home screen, and without it.

UtterDonkey commented 2 years ago

Would that make loading quicker?

SheepTester commented 2 years ago

It would make the loading time independent of your network speed because it's loading from your computer's file system. However, it's probably not going to be immediate because reading and storing all that in memory takes some time