service worker
This article is a stub. You can help the IndieWeb wiki by expanding it.
service workers are scripts that run in the background, separate from tabs with the site open, and are commonly used for offline functionality and push notifications.
Why
Why would you want to add a service worker to your site? Many reasons, though most commonly:
- offline support β allow visitors to still browse (parts of) your site when not connected. Ideally start with offline first support. See offline#Why for more reasons.
- local support β allow visitors (including yourself!) to interact with your site locally, independent of any network connection (thus not blocked / slowed by) and then sync those interactions in the background.
For a broader introduction including more reasons why, see:
- 2018-04-27 Jeremy Keith: Introducing Service Workers
How to
This section is a stub, please expand it with articles that have helped you get started!
How to get started with a service worker:
- 2018-03-06 Jeremy Keith: Minimal viable service worker
To support more features with your service worker, see the "How to" sections for those features! E.g.
Indieweb Examples
Jeremy Keith
Jeremy Keith on adactio.com since 2015-11-07:
Tantek
Tantek Γelik on tantek.com since 2019-10-20:
... add yourself
- add yourself here
Brainstorming
Things to maybe try doing with service workers.
See the Brainstorming sections of features supported by service workers! E.g.
See Also
- offline
- local first
- how to remove a "stuck" service worker https://github.com/NekR/self-destroying-sw