Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Service Worker and the Offline Web (Lightning Talk)

Service Worker and the Offline Web (Lightning Talk)

Lewis Cowper

March 07, 2015
Tweet

Other Decks in Technology

Transcript

  1. "Oh no! My signal's gone! Now I don't have access

    to my content" — The internet
  2. ServiceWorker ▸ JavaScript worker, can't access the DOM directly COMMUNICATES

    WITH PAGES IT CONTROLS VIA THE POSTMESSAGE INTERFACE
  3. ServiceWorker ▸ JavaScript worker, can't access the DOM directly ▸

    Programmable network proxy CONTROL HOW NETWORK REQUESTS FROM YOUR PAGE ARE HANDLED
  4. ServiceWorker ▸ JavaScript worker, can't access the DOM directly ▸

    Programmable network proxy ▸ Doesn't rely on global state, but can access IndexedDB TERMINATES WHEN NOT IN USE, AND RESTARTS WHEN NEEDED
  5. ServiceWorker ▸ JavaScript worker, can't access the DOM directly ▸

    Programmable network proxy ▸ Doesn't rely on global state, but can access IndexedDB ▸ Uses promises extensively
  6. ServiceWorker 1. Register your ServiceWorker 2. Tell your ServiceWorker what

    to do ▸ Offline Cookbook AWESOME AND FANTASTIC AND WORTH A TALK BY ITSELF.