I am following angular\'s best practice in order to make PWA.
After making production build (ng build --prod --aot
), I am also running the service worker from
With Chrome, you can enable a flag for treating a specific host as if it is a secure origin, allowing service workers to work:
./chrome --unsafely-treat-insecure-origin-as-secure=http://your.insecure.site:8080
To launch chrome from the terminal, you do need to know the executable location. This will be system dependent. For MacOs:
open /Applications/Google\ Chrome.app/ --args --unsafely-treat-insecure-origin-as-secure=http://your.insecure.site:8080