|
|
|
|
|
by giancarlostoro
530 days ago
|
|
Three things you need: * Manifest file * HTTPS - for localhost I dont remember the workaround, browsers have made this increasingly more complicated from recent experiences * Service Worker - This is where I said I had maybe 60 lines of JavaScript. If you have these three things, a browser should pick up that your sites a PWA and server running it should be irrelevant... So you MUST have a minimal amount of JavaScript, but I did it using pure vanilla JS, you dont need a fancy framework. On that same note, there might be a tool that could inject the bare JS necessary for this, but I dont think it exists, certainly could be built. |
|
I want the manifest to be automatically generated from whatever is in the directory. The service worker should download everything from the manifest at first launch. I'm ok with a download-on-demand build option, but by default it should grab everything needed. If a user installs something, it should be assumed that they can use it offline.
I feel like the tool should already exist. If it does not yet exist, it seems like there must be a reason for that that I am not aware of.