In today's discovery portal sync-up meeting we set out a rough plan for offline-enabling the Wikipedia portal using a ServiceWorker, and the node-serviceworker-proxy infrastructure. See the meeting notes for detail of the discussion.
This task will track the concrete prototyping work.
- @Krinkle has published the first steps towards setting up a serviceworker & integrating it in the gulp build process in https://gerrit.wikimedia.org/r/#/c/320244/.
- Gabriel will build on this by
- hooking up the serviceworker with node-serviceworker-proxy (in labs for now), and
- starting to move the localization logic from DOM to the ServiceWorker, roughly as outlined in the meeting notes.
The result of this should be:
- First view and clients without ServiceWorker support will see a fully localized copy of the portal, composed by node-serviceworker-proxy running the serviceworker code. Caching will vary on accept-language.
- Subsequent views in modern clients (mainly Chrome, possibly Firefox) will use the installed local ServiceWorker to serve the portal. This will be very quick, and will also render the portal when offline.