I want to develop a PWA - Progressive Web App for my WordPress website, https://egnews.in/marathi-news/ I have got manifest JSON and service worker downloaded using PWAbuilder.com, Now Where should I add these two files on my WordPress website?
1 Answers
You will want to put the manifest JSON in a location that browsers can access, I would suggest the root of your site (so egnews.in) although it shouldn't really matter. Make sure to reference it in the HTML of your website else the browser will never look for it. For more assistance look here.
As for the service worker, you need to explicitly register it using Javascript, see this link for some more help with that. Be careful though, a service worker can only control the pages that are in its same directory or its sub-directories. This means that if you place the service worker file in a directory (like egnews.in/service) it will only be able to interact with pages in the directory or below (so would only be able to help serve pages like egnews.in/service/example.html).

- 125
- 2
- 10