The Progressive Web Apps (PWA) technology developed by Google has been available to the public for almost a year, but relatively few people outside the world of hardcore developers are aware of what exactly they are, and how they can use them to their benefit.
It’s important to recognize that there are a few different concepts bundled up into the term “Progressive Web App” and that these individual parts have been available in one form or another before being tied together under one package. Those parts are: Service Worker, App Shell and JSON Manifest.
The Service Worker
The single most interesting component is that of the service worker script. This script acts as an additional layer between the website requests and the internet servers around the world.
It is also responsible for caching content when a visitor browses a PWA enabled page, and stores that data locally on the visitor’s device, whether that is a mobile phone, tablet or desktop computer.
This means that every time we click a link on a website with a Progressive Web App, the request will pass through the service worker script and then based on the rules set forth, will go online and ask for a new web page.
Alternatively, if the user is offline it is possible to have the service worker serve a cached page from the local storage, meaning that we can now design websites that will work 100% when browsed offline, as long as that user has been to the site at least once before.
While the idea of caching content and serving it to users without internet access is not by any means a new one, the combination with an app shell is powerful and offers entirely new ways of thinking about web development.
Read more: Here