Monday, May 20, 2024
195
rated 0 times [  199] [ 4]  / answers: 1 / hits: 6124  / 9 Years ago, wed, july 29, 2015, 12:00:00

I'm trying to register a service worker in an https iframe inside an http (unsecured) site.
Until lately, my code ran without any issues. From the last chrome update (44) this code fails inside the iframe:



navigator.serviceWorker.register('./service-worker.js');


I get this error in console:
Uncaught (in promise) DOMException: Only secure origins are allowed



Was there any change that now prevents secured iframes from registering service workers if they are running in an unsecured parent?


More From » push-notification

 Answers
7

It appears that this did change recently. It also appears that the current behaviour will now be maintained - see this discussion at the service worker spec repository. Both of those discussions cite this specification as the basis for the policy.


[#35272] Tuesday, July 28, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rossj

Total Points: 606
Total Questions: 100
Total Answers: 116

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;