Introduction
In this chapter, we will add a service worker to the application that we built in the previous chapters.
We will add the Angular service worker module to our application and configure it to convert the app into a Progressive Web App.
What is a Service Worker?
A service worker is a script that the browser runs in the background that acts as a network proxy to manage network requests programmatically. It sits between the network and the device and caches content, enabling an offline experience for the user.
In addition to caching data, it can also synchronize API data in the background and add things such as push notifications.
What is a Progressive Web App?
A Progressive Web App (PWA) is a term that is used for web applications that behave similar to a native mobile application. Similar to native apps, they allow an application to be started when the user is offline, caching the UI elements and API calls to display an initial page. This way, a user can...