Answer
Does a PWA need HTTPS?
Yes, a PWA needs HTTPS. Browsers refuse to register a service worker on a plain HTTP origin because it can intercept and modify every network request, which would be a serious security risk over an unencrypted connection. The only exception is localhost and 127.0.0.1, which browsers treat as a secure context for local development.
Why the restriction exists
A service worker can rewrite any response on its origin, so allowing it over HTTP would let a network attacker inject malicious code indefinitely, even after the user leaves the compromised network.
Development exception
localhost, 127.0.0.1 and file:// origins are treated as secure contexts, so you can develop and test service workers without a certificate.
Getting HTTPS in production
Free certificates from Let’s Encrypt, or automatic HTTPS from hosts like Netlify, Vercel and Cloudflare Pages, cover essentially every deployment scenario today.