SlideShare a Scribd company logo
Service Workers
By- Neha Sharma | @hellonehha
Take your Site OFFLINE
Introduction to Service workers
Say bye-bye to Dino
Demo
https://github.com/Neha/serviceworkers
Rich offline Experience,
Periodic Background Sync ,
Push Notification
Welcome to WEB!!
What is Service Worker?
A script that is run by your browser in the background, separate from a web page,
opening the door to features which don't need a web page or user interaction.
● Javascript Workers - Hence cannot access DOM. Service Worker communicate and Control the pages via
postMessage
● Service worker is a programmable network proxy, allowing you to control how network requests from your
page are handled.
● Services workers will be terminated when not in use and restarted when needed again.
● Services workers make extensive use of the Promises
What we need?
● Web Page
● HTTPs
● Service worker
● Browser which support Service worker
● Static Assets
How it Works?
Magic begins from here & go to sw.js
What’s next?
● Push notifications
● Background Sync
● And more...
Questions & Feedbacks @ neha@jslovers.com

More Related Content

Introduction to Service workers