Service worker help your user to still browse your website when user suddenly get disconnected because of no network. Service worker technology help developer to enable Rich offline experience in today’s era.
From Microsoft Edge (It’s in preview) to Chrome it’s have a support for Service worker, Safari version 46 start supporting Service worker. It’s kind of technology that doesn’t break Service worker if browser doesn’t support it, so it’s good part of Service worker.
How Service Worker Works ?
How to test things in Service Worker ?
In chrome dev tool when you go to Application tab, you see that it’s have service worker in left pane, you can play with these things to test your service worker. For debugging Service worker, Here is a nice article https://developers.google.com/web/fundamentals/codelabs/debugging-service-workers/
If you interested to learning from Scratch, There is good free course on Udacity which can help you learnng Service Worker in Details from scratch.