Page 1 of 1

Allow apps from file:// location to register service workers

PostPosted: Mon Nov 07, 2016 6:28 pm
by lkjh87941
Our app is implemented as local html+javascripts running in a custom-wrapped CEF browser. We have plans to enable push notification using GCM, but found out that file: protocol is not allowed to perform Service Worker registration.

I have tried to modify CEF source to enable it, but simply adding file protocol to serviceWorkerSchemes does not seem to do the trick. When the registration request reach the content layer, the ServiceWorkerProviderHost object created has an empty document_url. All my attempts to fill this field result in bad IPC Message error. Therefore I feel it would be better to find some help from people more knowledgeable on this.

Re: Allow apps from file:// location to register service wor

PostPosted: Tue Nov 08, 2016 2:24 am
by Czarek
A solution to file:// protocol issues is most often to use a custom scheme handler.