[ADDON] Elk Progressive Web App
Here is a packaged version of a PWA. This is an early prototype. It lacks refinement for sure. Feel free to ask questions or make suggestions. Your forum must be installed in the root directory. It won't work in a subdirectory.
Use of a PWA requires use of https. If your site isn't already secure, this is a great opportunity to make the upgrade. People are increasingly privacy concerned - and users will hold higher confidence in your site. Https certificates can now be issied for absolutely free. Explore "Let's Encrypt" for further information regarding your particular server setup.
The service worker is actually quite robust. It can store pages for offline viewing, including images! Note pages visited are stored in the cache.
This should work on Android with Chrome or FF. It may work on ios. I have no means to test or verify.
Please test and critique. This is my first attempt at a packaged mod. Thanks!
Much customization is possible. Desktop icons may be changed by replacing existing icons in /elk_pwa folder. The filename must remain the same and the image must be a square png image, with sides matching the file name. ex: 144.png must be a 144x144px image.
The bar color may be changed in PWA.subs.php file in the sources folder. Simply replace the value of $theme_color with a hex color code. Also match it in the manifest.json file as well.
The description and title may be altered in the manifest.json file in the root folder.
To use: simply upload the zip to the package manager. Install. It is hook based so no core code alterations. Modify as outlined above as you see fit. Restart php and apache/nginx. Open your device's browser. Empty the cache for your site. Surf your site a few minutes. If everything is working, users should be invited to Add to Home. Now it will behave much like a native app!
Enjoy!!
Re: [ADDON] Elk Progressive Web App
Reply #1 –
Here is the second iteration: version 1.0.1.
Changelog: the manifest file is automatically created upon package install using forum name in the app title and description.
Re: [ADDON] Elk Progressive Web App
Reply #7 –
I use attachment resize. It doesn't appear (yet) add ons are the issue. At the moment I think the service worker breaks ajax for some reason. More to come....
Re: [ADDON] Elk Progressive Web App
Reply #10 –
Great suggestions radu, thanks! It's probably ideal attaching the package to the first post. As I'm typing away on a mobile, I'll leave it on the current post until the laptop is available again. Lol!