Is Service Worker Ready? Can i Use Service Worker?

Mr Super Shetty
A Web Developer
Published in
3 min readJun 28, 2018

Yes my friends, its ready(almost). All major browsers except Opera Mini & the old IE 11 now support service worker.

As per caniuse.com it’s supported by 83.24% of all internet users. More importantly it’s supported 4 major mobile browsers

  1. iOS Safari
  2. Android Chrome
  3. Samsung Internet
  4. UC Browser

Together they account for lion share of mobile users. Almost 90%. That marks the arrival of Service Worker. Only your grand dad and the kid who wants to save all his data, power and speed doesn't support service worker.

So what if service worker is ready

It means you have been living under the web rock. Service work is the key piece of technology that makes native iOS and android apps obsolete. Basically it helps your websites run offline. Simply put, it’s a proxy that intercepts every network call and helps you programatically respond to it.

Checkout the slides below if you dont know what service worker is

This opens up the field for web apps that can compete on every front with a native app. Service worker is not just for enabling offline apps. Its also the basis for push notification. Although iOS dont yet support it(push) on mobile, my hunch is they would support it soon. They do support push on desktop via a proprietary api. Push api is heavily inspired from iOS Push API. It isnt a huge task for Apple to support it.

Service worker is a progressive enhancement.

It isnt a deal breaking feature. Nothing important breaks for your end user if his browser doesnt support service worker. But it’s that bell including which you make him feel wow. Thus go ahead and use service worker.

How do i use service worker?

The simplest way to get going with service worker is to use Google’s Workbox. It main focus seams to be offline apps and ensuring resilliance.

Workbox by Google

or Pick one of the recipes from Mozilla’s cookbook, serviceworke.rs. This contains a whole bunch of recipies from push notification to offline apps.

Best part of service worker is that you can simply CTRL+C and CTRL+V the code with minimal change.

--

--