PWA: Do we have to add links to manifest to the header section of all website pages?

Viewed 184

Do we have to add links to manifest to the header section of all pages of my PWA website or just the index.html file? same question for "metadata".

1 Answers

This is depending on if you are using a SPA (Single Page Application like React or Vue.js) or have overall static files.

For example, if you are using Vue.js, then it is enough to just put it in the index.html. Frameworks like Nuxt.js, which creates static files in the end, they do it automatically a reference on all .html files.

So, if you have static files (like index.html and second.html) you should always reference to the manifest. Just think about when the user directly gets to the second.html, he would not get notified about, that there is a manifest.json like the other metatags.

Related