Successfully reported this slideshow.
Your SlideShare is downloading. ×

Service workers in JavaScript

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 29 Ad
Advertisement

More Related Content

Slideshows for you (16)

Advertisement

Similar to Service workers in JavaScript (20)

Recently uploaded (20)

Advertisement

Service workers in JavaScript

  1. 1. What’s happening with Service Workers?
  2. 2. Let’s start with a survey
  3. 3. Q1: How many of you are aware of more than one feature of “Service Workers”?
  4. 4. Q2: How many of you are using Service Workers?
  5. 5. Q3: How are you using Service Workers?
  6. 6. Let’s start!
  7. 7. What is a Service Worker?
  8. 8. Scriptable Request Interceptor / Network Proxy
  9. 9. Prefetch resources
  10. 10. Syncing data When online after being offline
  11. 11. Offline capabilities Cache maintenance Demo
  12. 12. Fallback response e.g. 404 request for an image
  13. 13. Mock response
  14. 14. Communication between renderer and Service worker possible via PostMessage API
  15. 15. Timeout requests. Don’t have SPOFs. Enforce latency SLA on third party requests.
  16. 16. Offline Analytics caching Demo
  17. 17. Request JSON and render HTML via cached templates Drastically reduces the data sent to client on every page refresh.
  18. 18. Don’t invalidate complete resource Get and use the diff of the updated resource. **based on HTTP archive data, after 30 days the CSS data is 97% similar
  19. 19. Images and Service Workers
  20. 20. Dynamic image format Rewrite image url based upon the client headers for supported image formats
  21. 21. Image spritesheet Don’t rely on CSS background-image for using Image sprites
  22. 22. Cached header for JPEGs Based on Facebook Engineering’s image optimization post
  23. 23. Push Notifications Demo: PushCrew
  24. 24. Security
  25. 25. CSP in use with Service Workers
  26. 26. Resources: ● W3C spec ● Service Worker specification ● Service Worker Demos ● Is Service Worker ready? Slides: ● There’s a proxy in your browser - Ilya Grigorik
  27. 27. Thanks. Questions? +ApoorvSaxena @apoorv_saxena

×