Polymer Service and Maintenance Officer

I am trying to get started debugging my Polymer application. I manually processed it by copying what I think is PolymerCLI Polymer init.

I'm not sure what the service worker is loading. By default, development simply calls a call console.info(), indicating that it has been disabled for development.

When I use Polymer serveto service my application on localhost: 8080, I get the console.info message, although there is nowhere where I really upload the file service-worker.js. Since the application is much more complicated (and I'm trying to use http / 2), I have my own node based server. When I run this and then retrieve my application in the browser, service-worker.js does not load and does not start.

What does it do Polymer serveto turn it on?

+4
source share
1 answer

Perhaps another application that uses the same source (for example localhost:8080) has registered and installed a service worker.

Open the application panel in Chrome Canary to check / remove the service employee.

enter image description here

If youโ€™re unable to access Chrome Canary, open chrome://serviceworker-internals, find the area that matches your application, and click Unregister . There is also an option at the top serviceworker-internalsthat allows you to open the DevTools window and pause JS on SW. Turn this option on, and you can see which SW is working.

+5

All Articles