Service Worker conflicts
How to remove old Service Workers from other providers
If you have previously installed external Push Notifications providers, it's very common that their Service Workers stay idle in your visitor's Browsers. Check out what is a Service Worker at https://developers.google.com/web/fundamentals/primers/service-workers.
Perfecty Push needs to uninstall those service workers because ideally you should only have one Service Worker that receives and processes all the Push Notifications sent by your self-hosted server.
Note that by removing those old workers, it won't affect the PWA/AMP service workers because their URL doesn't match the default JS Regex detection.
In order to remove those old and idle Service Workers, you need to activate the
Remove conflicting workers (Push Services only)
option, and if you want to troubleshoot the whole removal process in the Browser check the
Enable Client Logs option, and
deactivate it after you're done.
All the options are described in Configuration.
In this example even if we deactivate the old plugin, their service worker stays active in the visitor's browser.
The old Service Worker is still installed in your Browser, if you open the Chrome's Developer Tools > Application > Service Workers you will see it with this URL:
Perfecty Push worker will have this URL:
The old Service Worker is still installed and active, even if you've uninstalled the old plugin from WordPress.
After enabling the
Remove conflicting workers (Push Services only) option, the conflicting worker is deleted by
Perfecty Push and the new one is installed.
You can see in the logs that the conflicting worker was detected and removed.
You can create your own and validate the resulting expression in https://regex101.com/ using the
In Test String use the conflicting worker URL as you can see it in the Chrome's Web Inspector, for the example described above it was:
In this validation you can see that it has 1 match.