Some websites can be installed on a phone: their icon appears on the screen like an app, and their pages still open when the signal is gone. A website that can be installed and still opens without a signal is called a PWA (progressive web app).
Its two ingredients
A PWA is made from two things:
- An identity card (the manifest): a small file with the app's name, icon and colours. From this card the browser knows the website can be installed.
- A drawer keeper (the service worker): a small piece of code that stays on the phone. It keeps copies of pages, as if in a drawer, and shows those copies when there is no internet.
What still needs the internet
A page that was kept can open without a signal. But a new order and a new message have to be sent to the server, and a page never opened before has to be fetched from the server. All of these wait for the signal to come back.
A PWA can only be installed from a site that uses HTTPS. On an iPhone there is no Install button: users install it with the Share button in Safari, then Add to Home Screen.
TL;DR: A PWA is a website you can install on a phone like an app. Its service worker, a small piece of code on the phone, keeps copies of pages, so a page that was kept still opens offline, which means with no internet.
⚡ A website you can install
Meaning: A PWA is a website that can be installed on a phone: its icon appears on the screen like an app. Its first ingredient is an identity card (the manifest): a small file with the app's name, icon and colours. From this card the browser knows the website can be installed.
⚡ The drawer keeper
Guess first: a small piece of code on your phone, called the drawer keeper, has kept a copy of a PWA's shoe page. Tonight the signal is gone, and you tap the PWA's icon. What shows?
The shoe page, from the copy that was kept.
Meaning: The drawer keeper (the service worker) is a small piece of code that stays on the phone, keeps copies of pages, and shows them when there is no internet.
⚡ What still needs the internet
Meaning: A page that was kept can open without a signal. But a new order and a new message have to be sent to the server, and a page never opened before has to be fetched from the server. All of these wait for the signal to come back.