A Progressive Web App extension.
Turns Flarum into a basic progressive web app. If a user loses connection, an offline page will appear with a simple message alerting them that this app does not work offline. As of version 1.1, this PWA no longer attempts to cache pages. This is because it was discovered that, in certain browsers / on certain devices, the extra caching was causing users to have to manually refresh pages in order to complete tasks such as logging out or logging in. However, even without caching this is useful because it gives users another option: the ability to install your forum and open it in a standalone app window.
- Required: Add sw.js to the public root of your site (i.e. /public_html/, /home/, or whatever your public root is called).
- Required: Add site.webmanifest to the public root of your site (/public_html/, /home/, or whatever your public root is called).
- Optional: Edit the site.webmanifest file. Change the name of the app, where the app icons are located, and even the theme color and background color settings. Do not change the start url or scope unless you know what you're doing.
composer require zerosonesfun/pwa
composer update zerosonesfun/pwa