In short Progressive Web Apps is a website which have good UX, responsive UI. And it must has Service Worker
with a manifest.json
.
Are offline-first, progressive web applications possible for CMS-driven work? If so, what are best practices to consider to maintain progressive-enhancement?
So if you are aiming for CMS, your questions will be likely:
1. is it possible to integrate Service Worker
in to CMS-driven work?
Answer is yes, regardless technology of either Front-end or Back-end offline-first of service worker does not care about what running at either side, but only handling the "endpoint" of an external request from browser.
For example:
- you want to make
/css/style.css
file load-able when offline.
- all you need to do is tell service worker to cache this file, and use it in case network is not avaialble.
2. what are best practices to consider to maintain progressive-enhancement?
- It is depend on what CMS you are using (poopular ones are likely have plugins for SW already)
- What are you prefering. Most of CMS users prefer to handle things through a plugin or some automation tools...
...but in my opinion, plugins for service worker will always limited by the use cases. And it will potentially complexified the work if you want to use other feature like "push", "notification"... etc...
=> So for me best practice is "NOT USING CMS PLUGINS" (hand-code it)
P.S.
If you decide to go for what I have suggested, there is a small js library of GoogleChrome team, which named "sw-toolbox". For short, a simple website will took lesser than 10 lines code and this tool to enable offline-first feature. (be awared that I am not counting background-sync, push, dynamic data caching... or any advance features)