PWA, Progressive Web Application Technology

Progressive web applications are intended to look like local applications, although they are provided online.

In November 2017, Google announced the termination of Chrome applications (Chrome Apps) and the closure of the Chrome Store, which allowed them to be downloaded.

PWA

This type of application has become irrelevant and is used too little, Google says, and should give way to PWAs that provide an identical experience to the user and have the advantage of working on all the latest browsers using new web technologies.

The meaning of the term "progressive" in PWA is rather vague and refers to the progress that applications running on any computer or mobile phone bring. PWAs actually have more accurate characteristics:

Technologies

In order for a web application to be similar to a local one, it must first of all be reactive, without delay, which is allowed by a series of new tools.

Web assembly

This new bytecode language allows you to add APIs to JavaScript that are available in the browser and are based on C, C++ or other languages. Their execution speed is close to the speed of binary code .

Index DB

The client computer may have created a database using IndexedDB. It is only available to the program that creates it. It can copy data from the database to the server (but you need to switch to the key/value format). It can also contain wasm or JS code, which will be permanently stored on the client computer (only for this application) and will not be downloaded with each new session.

Web and workers

Scripts in the background can be executed asynchronously in Web Worker. A way to make the app smoother. He communicates with the page via postMessage.

Service workers

This is a kind of Web Worker dedicated to the interaction of the server and the application. Like the previous one, it works asynchronously and invisibly, uses the postMessage interface. This is a proxy to everything that comes from the server: intercepts what is reported, transmits it to the page that uses it at the right time.

Manifest and Offline

The HTML tag has a manifest attribute to describe progressive use. The file specified by this attribute previously contained a list of resources that must be hidden on the client computer to be used offline. We used this line:

<html manifest="monapplication.appcache">

Resources were placed in the "cache" (memory buffer) on the client computer, which leads to the application of the extension, but any other extension can be used. But now it's outdated because we get the same result with IndexedDB and Service Worker .

From now on, the manifest attribute contains a link to a descriptive file, which makes it easier to use the application in any installer or other file. His statement has the following form:

<html manifest="monapplication.manifest">

File associated with the JSON-based format specified for this W3C. It contains the following guidelines:

PWA Reviews