Closed Bug 1601916 Opened 5 years ago Closed 3 years ago

Service worker doesn't work in the incognito mode. Connection - https.

Categories

(Core :: DOM: Service Workers, enhancement, P3)

70 Branch
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1320796

People

(Reporter: oandriie, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

Steps to reproduce:

I read official docs from Firefox foundation: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Service_workers_demo . In this docs you can find the link to the working example application with service webworker: https://mdn.github.io/sw-test/ . This example works perfect on normal mode, but in the incognito mode service worker doesn't initialize. I a bit debugged this application and found that Firefox in the incognito mode doesn't has Service worker:

var serviceWorkerIsAvailable = 'serviceWorker' in navigator; 
console.log('Could we use ServiceWorker?',serviceWorkerIsAvailable);

output in the incognito mode:
Could we use ServiceWorker? false

In the normal mode:
Could we use ServiceWorker? true

And service worker cache doesn't work too:

caches.open('v1').then((cache) => { console.log('Service worker cache storage works!');}).catch(err => {console.log('Fatal', err);});

It throws an error in incognito mode.

P.S. In our web application we used service worker and we have the same issue...

Actual results:

Service worker feature doesn't work in the incognito mode. In the Google Chrome it works...

Expected results:

Service worker feature should work in the incognito mode. Because it is an important feature and test application used secure connection - https.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Service Workers
Product: Firefox → Core

In mdn:
"Service workers only run over HTTPS, for security reasons. Having modified network requests, wide open to man in the middle attacks would be really bad. In Firefox, Service Worker APIs are also hidden and cannot be used when the user is in private browsing mode."

So, it's an unsupported feature and it's documented. Marking this as P3 and enhancement because this looks like a feature request to me.

Type: defect → enhancement
Priority: -- → P3

Is there a plan to fix this issue? Chrome has not such an issue in private mode.

Is there any updates on this issue? Is there chances in future that the Firefox may give support it in incognito mode?

I think this bug is a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1320796

Yes, this is a dupe; thank you for pointing that out!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.