Frontmatter
| id | 6584 |
| title | Polishing the ServiceWorker implementation |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Mar 25, 2025, 11:27 AM |
| updatedAt | Mar 25, 2025, 6:32 PM |
| githubUrl | https://github.com/neomjs/neo/issues/6584 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | 6585 worker.ServiceBase: create a separate cache for each version 6586 worker.ServiceBase: onInstall() => remove the skipWaiting() call 6587 worker.Manager: add controllerchange SW listener as early as possible 6588 worker.ServiceBase: onFetch() => limit caching to event.request.method === ''GET'' 6589 main.addon.ServiceWorker: registerServiceWorker() 6590 main.addon.ServiceWorker: registerServiceWorker() => updatefound listener 6591 worker.ServiceBase: onActivate() => clear previous caches |
| subIssuesCompleted | 7 |
| subIssuesTotal | 7 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 25, 2025, 6:32 PM |
Polishing the ServiceWorker implementation
tobiu assigned to @tobiu on Mar 25, 2025, 11:27 AM
tobiu added sub-issue #6585 on Mar 25, 2025, 11:29 AM
tobiu added sub-issue #6586 on Mar 25, 2025, 11:30 AM
tobiu added sub-issue #6587 on Mar 25, 2025, 11:33 AM
tobiu added sub-issue #6588 on Mar 25, 2025, 11:36 AM
tobiu added sub-issue #6589 on Mar 25, 2025, 2:06 PM
tobiu added sub-issue #6590 on Mar 25, 2025, 6:13 PM
tobiu added sub-issue #6591 on Mar 25, 2025, 6:17 PM

tobiu
Mar 25, 2025, 6:32 PM
tobiu closed this issue on Mar 25, 2025, 6:32 PM
While the current implementation works fine for caching related assets and even predictive caching via a
MessageChannelconnection to the app worker, it sometimes faces issues when deploying a new framework version to the online examples & website.My assumption is, that the
registerNeoConfigmessage arrives too late. Webpack can create different bundle file names, a previously cached asset is no longer available, which might result in a bug inside a main-thread and thus can prevent a reload.Let's see if @dfabulich 's old guide can help a bit: https://redfin.engineering/how-to-fix-the-refresh-button-when-using-service-workers-a8e27af6df68
I will create sub-tasks (tickets).