-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to register a service worker on a not fully HTTPS webapp? #1317
Comments
Yes, it has to be on HTTPS. Or more precise: secure contexts. |
You could send the user to an HTTPS page where there'd subscribe to push messages, then send them back to your HTTP site. You wouldn't be able to do this by including the HTTPS page inside the HTTP page as an iframe. The service worker wouldn't control any of the HTTP pages, as it would consider them to be part of a different site, as the origin is different. |
Thanks for the quick replies ! So from what I understand, it is possible to register a service worker on a HTTPS page even though some others pages of the website are HTTP as long as it's in a secure context. Since I want to use service worker for push notifications and not to control any of the HTTP page, it should worked. |
The browser considers these to be different websites. |
@vgalisson , can you pls share your experience if it worked or you needed to have fully HTTPS webapp? |
I'm currently implementing Firebase to send Webpush notification on a not fully HTTPS webapp. As webpsuh is using service worker which need HTTPS, I did some research to better understand how to use them and on Google Developers website I've found:
Does this means it is possible to register a service worker from a HTTPS page even though the rest of the website is HTTP ?
I've came across the issue #199 and @jyasskin's comment :
But because this was said before the specs around HTTP/HTTPS were done, I've been wondering if, in the final way service workers are implemented, the whole app has to be https?
Thanks in advance for any clarification !
The text was updated successfully, but these errors were encountered: