Bug 1869734 Comment 16 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

As Gijs mentioned we actually show some of the site data from private browsing in the "manage site data" dialog: Bug 1868448. This isn't consistent across storage implementations though, which makes the behavior pretty confusing to users. Ideally we would support clearing private browsing data (during the private browsing session) using our clear data UIs (Bug 1818783). The "manage site data" dialog could be updated to show separate marked entries for private browsing, or could show entries based on which window it's opened from (normal or private browsing).

(In reply to Hannes from comment #14)
> oh I think i found it - these cookies are created when telemetry is enabled.
> but come on, this again speaks for displaying some sort of context along with the data, so we see where it comes from. could safe so much time.

Perhaps any chrome requests should also be made in the context of the private browsing context, if "always use private browsing" is enabled. I'm surprised that telemetry requests would result in cookies being stored. Are you sure the cookies come from telemetry requests?

I've enabled "always use privatea browsing", cleared data and restarted the browser. I'm seeing the following cookies in the Browser Console:
```javascript
Services.cookies.cookies.map(c => ({host: c.rawHost, name: c.name, value: c.value}))
Array(5) [ {…}, {…}, {…}, {…}, {…} ]
​
0: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
1: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
2: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
3: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
4: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
length: 5
```

They get added here: https://searchfox.org/mozilla-central/rev/77aeaa184d59944ecb117e452ea43f5bd1556e4c/browser/modules/Discovery.sys.mjs#120,134 . The code is explicitly passing `privateBrowsingId: 0` which is normal browsing.
As Gijs mentioned we actually show some of the site data from private browsing in the "manage site data" dialog: Bug 1868448. This isn't consistent across storage implementations though, which makes the behavior pretty confusing to users. Ideally we would support clearing private browsing data (during the private browsing session) using our clear data UIs (Bug 1818783). The "manage site data" dialog could be updated to show separate marked entries for private browsing, or could show entries based on which window it's opened from (normal or private browsing).

(In reply to Hannes from comment #14)
> oh I think i found it - these cookies are created when telemetry is enabled.
> but come on, this again speaks for displaying some sort of context along with the data, so we see where it comes from. could safe so much time.

Perhaps any chrome requests should also be made in the context of the private browsing context, if "always use private browsing" is enabled. I'm surprised that telemetry requests would result in cookies being stored. Are you sure the cookies come from telemetry requests?

I've enabled "always use private browsing", cleared data and restarted the browser. I'm seeing the following cookies in the Browser Console:
```javascript
Services.cookies.cookies.map(c => ({host: c.rawHost, name: c.name, value: c.value}))
Array(5) [ {…}, {…}, {…}, {…}, {…} ]
​
0: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
1: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
2: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
3: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
4: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
length: 5
```

They get added here: https://searchfox.org/mozilla-central/rev/77aeaa184d59944ecb117e452ea43f5bd1556e4c/browser/modules/Discovery.sys.mjs#120,134 . The code is explicitly passing `privateBrowsingId: 0` which is normal browsing.
As Gijs mentioned we actually show some of the site data from private browsing in the "manage site data" dialog: Bug 1868448. This isn't consistent across storage implementations though, which makes the behavior pretty confusing to users. Ideally we would support clearing private browsing data (during the private browsing session) using our clear data UIs (Bug 1818783). The "manage site data" dialog could be updated to show separate marked entries for private browsing, or could show entries based on which window it's opened from (normal or private browsing).

(In reply to Hannes from comment #14)
> oh I think i found it - these cookies are created when telemetry is enabled.
> but come on, this again speaks for displaying some sort of context along with the data, so we see where it comes from. could safe so much time.

Perhaps any chrome requests should also be made in the context of the private browsing context, if "always use private browsing" is enabled. I'm surprised that telemetry requests would result in cookies being stored. Are you sure the cookies come from telemetry requests?

I've enabled "always use private browsing", cleared data and restarted the browser. I'm seeing the following cookies in the Browser Console:
```javascript
Services.cookies.cookies.map(c => ({host: c.rawHost, name: c.name, value: c.value}))
Array(5) [ {…}, {…}, {…}, {…}, {…} ]
​
0: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
1: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
2: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
3: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
4: Object { host: "addons.mozilla.org", name: "taarId", value: "e78b66cccb57a017da97631fbd05176d3674a7a68f4181b45751d49fff9245a3" }
​
length: 5
```

They get added here: https://searchfox.org/mozilla-central/rev/77aeaa184d59944ecb117e452ea43f5bd1556e4c/browser/modules/Discovery.sys.mjs#120,134 . The code is explicitly passing `privateBrowsingId: 0` which is normal browsing. The duplication comes from the code adding one cookie per user context (tab container).

Back to Bug 1869734 Comment 16