What Is a PWA?

A progressive web application is an application that is built with typical web technologies (HTML, CSS, and JavaScript) and distributed just like any other web application but has native-like functionality.

Google defines that PWA’s should be:

Reliable: Loads fast even with bad or no internet connection — due to the fact that over half of the users on the internet would leave a site if it does not load in three seconds. PWAs use service workers to remove the dependency on a web server when there is no internet connection.

Fast: Smooth animations and interactions that make the application feel native. (No clunky web scrolling.)

Engaging: Should have a user experience as close to a native device as possible. That means that it should at least be able to be run in full screen (if added to the home screen) and handle notifications. (iOS is not there yet.)

Service workers

A service worker is a JavaScript file that the browser runs in the background. It is mainly used as a proxy to the webserver. This means that if the browser does not have a stable internet connection, the requests will be handled by the service worker.

Hence, it could mimic the web server’s actions but from the cache and that gives it the power to work in offline mode.

Service workers can also be used to create features that don’t need a web page or user interaction, like push notifications for example.

Service workers are constantly being developed and, in the future, they might have new features such as geo-referencing to make the user experience as native as possible.