What is the Progressive Web App (PWA) and how it works?
Tags: javascript, webdev, beginners, tutorial
Published: 2020-09-11 11:03:35


![Alt Text](https://images.unsplash.com/photo-1484069560501-87d72b0c3669?ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80)

#**What is the Progressive Web App (PWA)?**
Progressive Web App (PWA) is a way to server the web application as if it a native app on all Versions of devices with the different operating systems without making various editions of the main app for each System, And Wikipedia says about PWA
“Progressive Web App (PWA) is a term used to denote a new software development methodology. Unlike traditional applications, progressive web apps are a hybrid of regular web pages (or websites) and a mobile application. This new application model attempts to combine features offered by most modern browsers with the benefits of mobile experience.”.

![Alt Text](https://images.unsplash.com/photo-1586527155047-b4639ecd6127?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80)

#**What Makes up a PWA?**
* Web Manifest
* Service Worker
* Static website

![Alt Text](https://images.unsplash.com/photo-1586190022484-455f9692c4d6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80)

#**How Progressive Web App (PWA) work?**
Any PWA contains some steps that happen for the first time when the user adds it to the device, and others that happen regularly when the application is offline or connected to the Internet, which makes it behave like the original applications now I will give you these steps.

- the website asks the user to add as an icon on the home screen of their phones based on how frequently they visit the website.
- when the user accepts the request after that the website cache the manifest, static website data, and the server workers in the local storage of the browser that makes it faster after initial loading
- Then PWA sends a web application manifest to the system containing:
    - knew The name of the web application
    - Links to the web app icons or image objects
    - The preferred URL to launch or open the web app
    - The web app configuration data
    - The default orientation of the web app
    - The option to set the display mode, e.g. full screen
- Then it was time for the better part, the role of the service worker that is can respond to Web / HTTP requests By Implement a programmable network proxy. It can cache content when that service is Unavailable, serve that content later in the document and check if a remote server is available. Service workers operate separately from the context of the main document, and the server worker life cycle divided into three steps:
    - **Registration:** Registration involves telling the browser the location of the service worker in preparation for installation.
    - **Installation:** if there is no service worker instilled, the Installation occurs in the browser for the Progressive Web app, or if there is needed update to the service worker.
    - **Activation:** if all the PWAs pages are closed the Activation occurs so that there is no conflict happen between the previous version and the updated one. since only a single service worker can be active for a domain.


![Alt Text](https://images.unsplash.com/photo-1582070763274-dbeb2ef35190?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=982&q=80)

# What are the Features of the Progressive Web App (PWA)?

- Progressive, for every user, needs on the browser, on the device, offline, online.
- Can work offline
- Fast, after initial loading
- Always up to date
- Installable, without the use of an App Store.
- Responsive, For all devices
- Safe, Served via [HTTPS](https://en.wikipedia.org/wiki/HTTPS).
- Re-engageable, maintain engagement with the user by push notifications.
- shareable Can easily be linked via a URL.
- Behave like native apps

![Alt Text](https://media-exp1.licdn.com/dms/image/C4E12AQF8slpeJDeJZA/article-inline_image-shrink_1000_1488/0?e=1604534400&v=beta&t=TL3p15wOI4gq17YaEwYYyTCfFag6K9rO7ysi-rkJnRg)

#**Conclusion:**
in the end, PWA is a very powerful technology that very important for every web developer must learn and use based on the Features we describe before, Who knows, this could be your speciality.