What is Service Worker?

Service Worker is Javascript running on a separate thread than the usual browser Javascript thread. This provides various features possible like Push notification, Background Sync, making website run offline by using caching options.