📖 Mobile First Web Design /
Module: Taking the web offline

Service Workers

📖 Mobile First Web Design / Taking the web offline / Service Workers

Service Workers

Application cache is deprecated. It is quite headache to maintain. Now we use Service Worker to cache offline file.

This feature is in the process of being removed from the Web platform. (This is a long process that takes many years.) Using any of the offline Web application features at this time is highly discouraged. Use service workers instead. — WHATWG spec

Image.png 189 KB



Service Worker is a proxy between browser and server. It can do much more than caching files. For example, it can run in background process and push notifications to your device.

The Google Chrome’s github page provides an example code on the offline capatability.