Remove temporary PWA service worker - #1051
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
馃挕 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4aadc3ef1
鈩癸笍 About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // This service worker temporarily replaces the worker generated by next-pwa. | ||
| // Keep it available at /sw.js so browsers with the old worker installed can | ||
| // receive this update, clear the obsolete PWA caches, and unregister it. |
There was a problem hiding this comment.
Preserve the cleanup worker for dormant PWA clients
If a user with the generated Workbox worker does not revisit during the four-week window in which this cleanup version was served, returning after this deletion makes the automatic /sw.js update request receive a 404; that failed update leaves the existing registration and worker in place, so this activate cleanup never runs and the obsolete caches and request routes continue controlling the origin. Keep the cleanup script available at this URL indefinitely, or add another durable client-side unregister mechanism before removing it.
Useful? React with 馃憤聽/ 馃憥.



No description provided.