freshinktechcoopParticipantOctober 31, 2018 at 11:39 pmPost count: 10
Curious if anyone has built a progressive web app (PWA) on top of Avada? I’m looking at some options for getting WordPress sites into both the Play Store and iOS app marketplace.
For others who are curious I’ll post updates on this thread, so far I’ve gathered resources and ideas and put them onto this Trello Board
Any ideas or resources would be great!AristeidesSpectatorNovember 1, 2018 at 11:38 amPost count: 23
The fastest and most effective way to do PWAs that I’ve found so far is Google’s Workbox: https://developers.google.com/web/tools/workbox/
You can find a list of common recipes on https://developers.google.com/web/tools/workbox/guides/common-recipes and that will give you an idea of how things work.
The process will have to look something like this:
* Enqueue your JS file via PHP (see wp_enqueue_scripts)
* In the JS file Register the worker
* In your PHP file use wp_localize_script to pass things like your home URL, paths that should be cached etc
* In your JS file use workbox and follow the recipes I linked to above to start caching your assets.
That’s for the caching aspect that will halp make your site available offline.
Then you can add a manifest and define everything you need to add there.
You could also take a look at this feature plugin: https://wordpress.org/plugins/pwa/
I hope that helps!
- You must be logged in to reply to this topic.