Closed
Bug 1112136
Opened 10 years ago
Closed 9 years ago
hide ServiceWorker APIs when in private browsing mode
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bkelly, Assigned: ehsan.akhgari)
References
Details
One of the outcomes of the various principal work was that ServiceWorkers should not be usable from a private browsing session. To allow feature detection to work we should hide the SW API when in private browsing mode.
Reporter | ||
Comment 1•10 years ago
|
||
What do you think we should do with the other SW APIs in private browsing mode? In bug 1112134 you felt hiding was the wrong solution.
The SW registration is persistent of course, so that's why it matters here.
Perhaps its easier just not to persist the registration in this case?
Flags: needinfo?(ehsan)
Assignee | ||
Comment 2•10 years ago
|
||
Non-persistent registrations are not very useful though.
Can we just make ServiceWorkerContainer.register() return a Promise which will never get resolved? The same scenario would happen if, for example, the user doesn't grant permission when we prompt them during the register() call, so those cases would be indistinguishable from the viewpoint of the Web author.
Flags: needinfo?(ehsan)
(In reply to :Ehsan Akhgari (not reading bugmail, needinfo? me!) from comment #2)
> Non-persistent registrations are not very useful though.
>
> Can we just make ServiceWorkerContainer.register() return a Promise which
> will never get resolved? The same scenario would happen if, for example,
> the user doesn't grant permission when we prompt them during the register()
> call, so those cases would be indistinguishable from the viewpoint of the
> Web author.
The spec never mentions prompting the user, but leaving a Promise unresolved seems an ugly approach. Rejecting the promise with SecurityError or PermissionDeniedError may be better.
PermissionDeniedError - https://www.w3.org/Bugs/Public/show_bug.cgi?id=23033
Assignee | ||
Comment 5•10 years ago
|
||
You're right, rejection is definitely better.
Comment 6•10 years ago
|
||
I guess it should block v2. Please, change it if it is not the case. Thanks!
Blocks: ServiceWorkers-B2G
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ehsan
Updated•9 years ago
|
Status: NEW → ASSIGNED
Updated•9 years ago
|
Keywords: dev-doc-needed
Updated•9 years ago
|
Reporter | ||
Comment 7•9 years ago
|
||
We fixed this at some point in another bug.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Updated•9 years ago
|
Keywords: dev-doc-needed
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•