3

I'm seeing navigator.serviceWorker always return undefined in mobile Chrome and mobile Firefox on both iOS and Android devices. The site is being served over HTTPS, window.isSecureContext returns true, and I'm not in a private/incognito window/tab. This rules out common explanations for this, such as those pointed out here.

It would seem these mobile browsers simply do not support the ServiceWorker API, but from everything I've seen they should.

Any ideas?

Isaac Gregson
  • 1,999
  • 1
  • 21
  • 31
  • iOS pseudo browsers are not real browsers, they just use a WebView to allow sharing your passwords, favorites, etc. However the latest iOS (14) should allow WebViews to finally use service workers. But right now I think that is limited to a developer preview of the OS. – Chris Love Sep 26 '20 at 18:44

1 Answers1

0

For the iOS case, I upgraded iOS from 13.x to the (super recent) 14.x. I was already on the latest versions of both Firefox and Chrome, so perhaps those upgrades required the latest iOS (not sure). As to why they weren't working on Android, I believe the problem was related to a different issue.

Anyways, perhaps this is helpful for someone else who may hit this. Mobile Firefox and mobile Chrome on both iOS and Android certainly support service workers.

Isaac Gregson
  • 1,999
  • 1
  • 21
  • 31