Suitable for template specific PWA/SW?
-
Hello!
We were looking to introduce a Service Worker into an existing site to provide a specific curated collection of resources that could be queued up for caching after some input from the user. This would not involve turning the entire site into a PWA, rather, just a specific template that would provide the UI for this curated collection.
Would setting the template URL as the entry point suffice here?
Our hope was that the PWA plugin would provide the foundation for this, but I’m increasingly getting the impression that this may not be the case, and that we will need to spin up a more custom implementation. Is this a fair assumption?
It’s not immediately clear how we would interface with the front-end service worker to implement our own logic to dictate what is cached, after our JS is registered via
wp_front_service_worker
.Granted there are PHP filters available for this, but we’ll need more dynamic control over what is added to the cache, and when.
Do you have any examples, JS specifically, of custom Service Worker implementations using the plugin? Is the JS API basically a middleware between WP and Workbox?
Thanks,
Dave- This topic was modified 3 years, 6 months ago by .
- This topic was modified 3 years, 6 months ago by .
- This topic was modified 3 years, 6 months ago by .
- The topic ‘Suitable for template specific PWA/SW?’ is closed to new replies.