You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Enhanced Control and Feedback for Service Worker Registration and Caching #57159
Currently, the Angular service worker does not provide adequate control and feedback mechanisms during the registration and caching process. This can lead to issues where developers are unable to detect if the service worker registration has failed or if the caching process has been successfully completed.
Example, right now I am unable to detect if the service worker registration failed. After inspection I found out that the navigator.serviceworker.register code is present in main.js file generated after production build. The catch handler attached to the returned promise just consoles the error.
Also, there is no feedback about the caching of assets. The service worker is installed even if any asset could not be cached but some use cases might things to be handled a little differently.
Describe the solution you'd like
The ServiceWorker module could provide some observables which emit such errors and feedback for registration failure, successful caching etc.,
Also more control over caching should be present because for some applications which are fully offline might require that all assets be cached before the Service worker installation is deemed successful.
Describe alternatives you've considered
Tried using the observables provided by SwUpdate service but realized that they don't work for the initial registration.
Tried using navigator.serviceworker.ready promise but this promise never rejects and will wait indefinitely to resolve until some SW is registered.
changed the title [-]Feature request: Enhanced Control and Feedback for Service Worker Registration and Caching in Angular CLI[/-][+]Feature request: Enhanced Control and Feedback for Service Worker Registration and Caching[/+]on Jul 27, 2024
Activity
[-]Feature request: Enhanced Control and Feedback for Service Worker Registration and Caching in Angular CLI[/-][+]Feature request: Enhanced Control and Feedback for Service Worker Registration and Caching[/+]JeanMeche commentedon Aug 29, 2025
With #63364 we've announced that the service-worker package in now in maintenance mode and will not receive feature PRs and feature requests.
The message is also visible here: https://angular.dev/ecosystem/service-workers
angular-automatic-lock-bot commentedon Sep 29, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.