0011. Progressive Web App service worker
Generated from front/docs/adr/0011-pwa-service-worker.md
- Status: Deprecated (retroactive) - registration removed 2021-10-14, files deleted 2022-05-25
- Date: 2021-09-20
Context and Problem Statement
Section titled “Context and Problem Statement”Right after the restart the demo was published on GitHub Pages and was meant to be installable as a PWA.
Considered Options
Section titled “Considered Options”Not recorded.
Decision Outcome
Section titled “Decision Outcome”CRA’s Workbox template was added (src/serviceWorker.ts, src/serviceWorkerRegistration.ts,
serviceWorkerRegistration.register() in index.tsx) together with public/manifest.json
and app icons. Less than a month later the registration call was removed in a TypeScript
clean-up, and the files were deleted with the Docker build work. Only the web manifest and
icons remain (refreshed in 2024 for the Capacitor app, 0013),
plus a commented-out registration snippet in index.html.
Inferred: no reason is recorded; offline caching of an LMS that depends on live API data and authenticated content gave little benefit and risked stale bundles.
The only service worker in use today is the SCORM loader (0007), which is unrelated to PWA caching.
Consequences
Section titled “Consequences”- Good: no stale-cache problems after deployments.
- Bad: no offline support; “installable” only via the manifest.
Evidence
Section titled “Evidence”26fc28162021-09-20 “pwa”;4678cb282021-09-20 “Feature/pwa (#31)” - addsfront/src/serviceWorker.ts,front/src/serviceWorkerRegistration.tsc4ec05952021-09-21 “pwa base” -front/package.jsonhomepage/Front/c2c8d5652021-10-14 “ts fixes (#64)” - removesserviceWorkerRegistration.register()fromfront/src/index.tsx95408afd2022-05-25 “docker build (#175)” - deletes both service worker files