BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Service Workers Now Supported across All Major Browsers

Service Workers Now Supported across All Major Browsers

This item in japanese

With the Windows 10 April 2018 Update released on April 30th, and the Safari 11.1 release on March 29, Edge and Safari join Firefox and Chrome in enabling Service Workers by default. Developers can now develop Progressive Web Apps providing offline functionality and expect them to function across all browsers except Internet Explorer and Opera Mini.

Service workers are a key functionality for Progressive Web Apps (PWAs), applications that bridge the gap between native and web by allowing them to be ‘installed’, send relevant push notifications, and load quickly even on flaky networks. With these updates, PWAs can now be installed on iOS and Windows 10 devices, joining Android and Chromebooks.

Google has been one of the biggest advocates of PWA functionality, and tech companies have been utilizing PWAs for Android for some time. Some notable examples are Twitter Lite, Flipkart, and Pinterest’s new mobile web application. In a case study describing Pinterest’s new mobile experience, Google engineering manager Addy Osmani wrote:

Time spent is up by 40% compared to the old mobile web experience, user-generated ad revenue is up 44% and core engagements are up 60%.

Even when not looking to create a full offline experience, service workers can be extremely useful. Commonly touted benefits include reducing bandwidth usage and speeding up time to first impression, but the flexibility of the API enables a wide range of potential usage. In an engineering blog post about additional applications, Inian Parameshwaran of Dexecure said:

Service workers is probably the single most powerful API added to the web platform recently. It gives you access to a programmable proxy in JavaScript land. You can do anything you want with each request made and the response received by the browser - cancel the request, re-route it, modify the response(in some cases), cache it, etc.

Some of the applications highlighted included client side load balancing, image optimization per device and bandwidth conditions, and even advanced image decoding.

Developers interested in learning about service workers can check out a Google Web Fundamentals primer or the Mozilla documentation. Those looking for a quick start can use the Workbox library from Google to rapidly integrate a number of common Service Worker functionality such as precaching, runtime caching, request routing, background sync, and more.   

Rate this Article

Adoption
Style

BT