Upscaling a SPA into a PWA
The first requirement mentioned previously is to serve the application over a secure connection. We will see how to accomplish this by installing a free SSL certificate in our server using Let’s Encrypt, in Chapter 10, Deploying Your Application. With that in mind, let’s see how to fulfil the other requirements.
The manifest file
Adding a manifest file is the starting point to turn our application into a PWA. It is nothing less than a JSON file with well-known fields that instruct the browser or operating system on how the application should be installed on the desktop or mobile device. This file must appear linked in the head
section of our index.html
file, and while it could be arbitrarily named, the convention is to use the name manifest.json
or app.webmanifest
. The official specification suggests the .webmanifest
extension, but at the same type clarifies that the name is not really important as long as the file is received properly...