I'm learning the basics of using A2HS on PWA. when I want to open the A2HC banner in chrome devtools, an error appears like this "No matching service worker detected. You may need to reload the page, or check that.....". I don't understand why it's like this. this if my file:
Asked
Active
Viewed 214 times
1 Answers
1
From the files you shared, it seems to don't have a service worker, in order for the PWA to be installable one of the requirements is a service worker. Check this documentation, specially the part about service worker scope.
The scope of the service worker determines which files the service worker controls, in other words, from which path the service worker will intercept requests. The default scope is the location of the service worker file, and extends to all directories below. So if service-worker.js is located in the root directory, the service worker will control requests from all files at this domain.

Adriana Jara
- 54
- 3