What security restriction applies to Service Worker registration?
Service Workers require HTTPS (except for localhost during development) due to their powerful ability to intercept network requests and modify responses. This security requirement prevents man-in-the-middle attacks that could compromise the application. localhost is exempted to facilitate development, but production deployments must use HTTPS.