Progressive Web Applications (PWAs) help to create applications for web and mobile platforms that can work offline and can be accessed outside the browser on supported mobile devices. PWAs blur the line between web and traditional native applications and leverage a number of key technologies:
- Service Workers—Allow the application to take control of the network and to function offline.
- Application Manifest—Allows the user to pin the application to the Home screen.
The Progressive Web App Checklist lists all important requirements for Progressive web applications.
Google's Lighthouse tool generates a report which focuses on five major fields—performance, Progressive Web Application, accessibility, best practices, and search engine optimization (SEO). These indicators demonstrate the strengths and weaknesses of the application and allow for determining areas for improvement.
- Create a template CLI project with a default
ngsw-config.jsonconfiguration file for the service worker by running
ng new my-project --service-worker. You can further modify
ngsw-config.jsonby applying a custom service worker configuration.
- (Optional) Create a
manifest.jsoninstructs the application device how to display the application on its home screen. For more information on setting up and configuring
manifest.json, refer to the article about the web app manifest.