Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Worker how-to #112

Closed
emaildano opened this issue Dec 7, 2018 · 1 comment
Closed

Service Worker how-to #112

emaildano opened this issue Dec 7, 2018 · 1 comment

Comments

@emaildano
Copy link

Hey!

From the README it sounds like service workers at this point at not automatically generated/added to sites due to how service workers operate. e.g. Multiple service workers can create a few issues because there can/should only be one.

  1. Is that assumption correct?
  2. If so, do we have to add that script to our sites on a case by case basis to enable the SW?

I may be reading this wrong but it sounds like until Core has support for SWs this will be a manual step for now. At least with this plugin.

@westonruter
Copy link
Collaborator

Actually, a service worker are automatically added to sites. The thing is that only one service worker is registered for the frontend of the site (and one for the admin). Themes and plugins then hook into the generation of the service worker to add their logic. This means they can avoid attempting (and failing) to register multiple service workers, because the feature plugin registers them on their behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants