Engrain by ByteRush

WEB.06 3 concepts · 3 ready

Workers and service workers

Move work off the main thread and build offline-capable apps.

  1. WEB.06.01Web Workers + SharedArrayBuffer, Atomics and cross-origin isolationCoreMid-level13 min
  2. WEB.06.03Service worker lifecycleCoreMid-level12 min
  3. WEB.06.04Caching strategies and offlineCoreMid-level12 min

Interview questions in this module

  1. What is a Web Worker and what can it not do?
  2. What are transferable objects?
  3. Describe the service worker lifecycle. Why does a new service worker wait?
  4. Compare cache-first, network-first and stale-while-revalidate.
  5. How do you avoid users being stuck on an old version because of a service worker?
  6. Why does SharedArrayBuffer need cross-origin isolation?