PWA is a term that stands for Progressive Web App. It is a web app that uses modern web capabilities to provide a user experience similar to that of a native app.

PWAs are fast, reliable, and engage users on a level that is similar to a native app. In fact, many users may not even realize they are using a PWA since the experience is so fluid.

Some key features that make a PWA include things like service workers, which allow for offline functionality, and push notifications, which keep users engaged even when they are not actively using the app.

PWA is a new technology that promises to revolutionize the web. It enables developers to create powerful, fast, and reliable web applications that work offline and are always available. 


PWA is based on service workers, which are scripts that run in the background and provide offline capabilities and other performance enhancements. Service workers are the key to making PWAs work, and they're supported in all modern browsers. 

PWA users can add your app to their home screen, receive push notifications, and access native device features like camera and GPS. PWAs are designed to be an alternative to native apps, offering a similar experience without the need to download and install an app from a app store. 


The benefits of PWA are many:
* Reliable: Service workers make sure that your content is always available, even if the network is unreliable.
* Fast: Service workers can cache your content so that it loads quickly, even on slow networks.
* Engaging: Push notifications and home screen shortcuts make your app more engaging and allow you to re-engage your users.
If you're looking to create an app that is reliable, fast, and engaging, then PWA is the way to go.

How to Create a PWA

Press F12 and inspect in firebug. Go inside the application tab and disable the option. Application still runs in the offline mode. PWA applications run in the offline mode.
  • It should run over HTTPS or on Localhost.
  • It should contain Manifest file.
  • It should have Service Worker file.
  • It should be responsive in order to work on mobile devices.
  • Runs while offline by caching the core assets

Source Code

Create a folder. I named it as a “PWA” folder. In this folder, create the below files

  •     Index.html
  •     Images/logo
  •     src/index.js
  •     src/master.css
  •     manifest.json

Progressive web app

Firstly create a file named manifest.json. In this file write the below code
  • In the name property we give the name of the application
  • In start URL, we provide the root URL to folder path
  • Background color will define the actual background color of splash screen.
  • Standalone property will hide the URL and your website will look like native app.
{

“name”: “pwa example”,
“short_name”: “pwa example”,
“start_url”: “.”,
“background_color”: “#6ccdeb”,
“theme_color”: “#009785”,
“display”: “standalone”
}
 
Check the below screenshot
 
Progressive web app
 
 

Let’s go and save this and link this file in the header tag. Save it, and see in the browser

Progressive web app

 

Now there is one more property, which we need to mention here is the icon property. Here we will pass an array with list of icons. I will place two icons with different sizes, one is of 192px and other is 512px.
 

Inspect and see that, the manifest file is picked up by the application tool. If the manifest file is picked then it means, we are going in right direction.

Progressive web app

Now we have cached the resources. Now, we will intercept the fetch request. It means that the application can now be in store.

Progressive web app

 

Progressive web app

Progressive web app

In this way you can create a PWA application.
 

2022 Most Popular PWA Frameworks

 There are multiple frameworks for PWA. Although there are many PWA frameworks available, not every one of them is suitable. Some of the best frameworks are -

1. Angular

2. React

3. Vue

4. Ionic

5. Polymer

6. PWA Builder 

Overall, PWAs provide a great user experience that can rival even the most native of apps. If you are looking to create a web app that provides a truly native-like experience, then a PWA is definitely the way to go.