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

PWA基礎_2

gyarasu
November 13, 2018

 PWA基礎_2

Service Workerについてかんたんにまとめてあります。

gyarasu

November 13, 2018
Tweet

More Decks by gyarasu

Other Decks in Technology

Transcript

  1. Service Workerͱ͸ʁ ▹  Web WorkerͷҰछ ▹  Webϖʔδͱ͸ผεϨουʢ=όοΫάϥ ΢ϯυʣͰεΫϦϓτॲཧΛಈ࡞ͤ͞Δ࢓ ૊Έ ▹ 

    ϓϩΩγαʔόͱͯ͠ͷಈ࡞ ▹  Webϖʔδ͔ΒͷϦΫΤετΛίϯτϩʔ ϧͯ͠ɺΦϑϥΠϯମݧΛఏڙ 5
  2. 6 Service Worker֓೦ਤ Local Internet Page Service Worker Cache IndexedDB

    Internet Server Catch Request Background Sync Listen Push Event
  3. 10 ϥΠϑαΠΫϧ Installing Waiting Active https://developer.mozilla.org/ja/docs/Web/API/ServiceWorker_API/Using_Service_Workers •  Service Workerͷొ࿥ • 

    ಛఆϦιʔεͷΩϟογϡ •  ηοτΞοϓ͕׬ྃͨ͠ঢ়ଶ •  ݱࡏΞΫςΟϒͳService Worker ͷऴྃ଴ͪ •  fetchɺsyncɺpushΠϕϯτΛϋ ϯυϦϯάͰ͖Δঢ়ଶ
  4. ·ͱΊ ▹  PWAʹ͓͚ΔΦϑϥΠϯΩϟογϡɺϓο γϡ௨஌ɺόοΫάϥ΢ϯυಉظͷػೳ͸ Service WorkerʹΑͬͯఏڙ͞ΕΔ ▹  Installing, Waiting, Activeͷঢ়ଶΛίϯτϩ

    ʔϧͯ͠ɺద੾ʹػೳΛ࣮૷͢Δ ▹  Service Worker͸Webϖʔδͱ͸ผεϨο υͰಈ࡞͢ΔͨΊɺDOMʹ௚઀ΞΫηεͰ ͖ͳ͍ 13
  5. END