Service Workers

Overview

 

  • What are workers and what do they solve
  • Different types of workers
  • Network is a progressive enhancement
  • Offline Experiences & AppCache
  • Service Workers
  • DEMO Torbit Dynamic rewrites as a Service Worker 

 

What are workers and what do they solve?

JS is single threaded asyncronous

Workers allow you to do work outside of the main 'thread'

Types of workers

  • Dedicated Worker
  • Shared Worker
  • Service Worker

Network as progressive enhancement

Offline Experiences & AppCache

Service Worker

Lifecycle

  • Register
  • Install
  • Use

Ways to Register

  • with JS
  • using a link tag 
  • using the Link: header

Install

DEMO time

 

https://www.youtube.com/watch?v=cR-TP6jOSQM


https://jakearchibald.github.io/isserviceworkerready/


https://app.pluralsight.com/player?course=building-offline-web-apps-service-worker&author=nik-molnar&name=building-offline-web-apps-service-worker-m4&clip=2&mode=live

 

http://offlinefirst.org

 

Service Workers

By Gabriel Cziprusz

Service Workers

  • 148