Last week I presented an instructional demo about ServiceWorkers at the Port Townsend Web Developers Meetup. Seemed to go well many of them were excited about the possibilities.
The demos included
- setting up separate serviceworkers for each folder of a mock website.
- setting up a single serviceworker for the entire website but with multiple fetch handlers
- a semi-realistic fetch handler with cache-first and network-first options
- (very basic) templating demo.
- examples or notes about many of the "gotchas" and caveats.
The presentation is on GitHub with example code and readme files. The best way to try the examples is to download and run the examples on your own computer. You can also just serve them from GitHub using my github.io pages.