Support » Plugin: Page Speed Optimization » Leaves a mess behind.

  • Why are questions regarding plugin removal seemingly ignored? After uninstalling I’m getting errors in the console such as:

    Uncaught SyntaxError: Unexpected token < in JSON at position 0
    setTimeout (async)
    (anonymous) @ abtf-pwa.debug.js?path=%2F:4
    Promise rejected (async)
    D @ abtf-pwa.debug.js?path=%2F:4
    (anonymous) @ abtf-pwa.debug.js?path=%2F:4
    O @ abtf-pwa.debug.js?path=%2F:4
    (anonymous) @ abtf-pwa.debug.js?path=%2F:5
    09:03:32.145

    I’ve deleted the files that were left over and yet the errors persist.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimalisatie.nl

    (@optimalisatie)

    The PWA extension has been quickly added in a previous update. It will be improved in a next update of the plugin.

    Service workers reside in the client (browser) and without the plugin installed, there is nothing that the plugin can do to uninstall the service worker for visitors. It will require a manual action.

    To uninstall (unregister) the service worker you can manually delete the file abtf-pwa.js and use the following code on the website (in header.php):

    <script>
    if ('serviceWorker' in window.navigator) {
        try {
                navigator.serviceWorker.getRegistrations().then(function(registrations) {
                    if (registrations) {
                        registrations.forEach(function(registration) {
                            if (typeof registration.unregister === 'function') {
    
                                // verify script url
                                if (registration.active && registration.active.scriptURL) {
                                    if (!registration.active.scriptURL.match(/abtf-pwa/)) {
                                        return;
                                    }
                                }
    
                                registration.unregister();
                            }
                        });
                    }
                });
            } catch (e) {
    
            }
        }
    }
    </script>

    manual action???? omg

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Leaves a mess behind.’ is closed to new replies.