Improve UX of per site cookie exception settings
Categories
(Toolkit :: Data Sanitization, enhancement, P3)
Tracking
()
People
(Reporter: trond, Unassigned)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:154.0) Gecko/20100101 Firefox/154.0
Steps to reproduce:
Added a new site to the exception list so the session would persist after restarting Firefox. When closing and opening the exception dialog the site is listed.
Actual results:
The session didn´t persist after restarting Firefox. The site was no longer listed in the exception dialog.
I also noticed that all previously added sites were missing from the exception dialog. When visiting those sites the session are still active on restarting Firefox indicating previously saved exceptions are restored when restarting Firefox.
Expected results:
The exception should have persisted on restarting Firefox.
Comment 1•2 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::Data Sanitization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 months ago
|
||
Confirm the same here on two different setups.
Settings -> Privacy & Security -> Browsing Data -> Manage Exceptions.
Add exception -> Allow -> Save.
Open again it's still there.
Close browser and check again it's gone.
It's also not hidden or something, the site I configured there now keeps prompting me for a 2FA code instead of using the cookie.
Comment 3•2 months ago
|
||
Same thing here
The "exceptions" list is erased when I quit and reopen the app :(
Comment 4•2 months ago
|
||
Managed to reproduce:
Settings - Privacy & Security.
History -> Customize History
Choose -> Untick always use Private browsing mode (restart)
Only tick "Clear history when Firefox closes" -> Settings -> Tick all
After this the exceptions are gone.
Comment 5•2 months ago
•
|
||
I was able to reproduce with steps provided in comment 4.
clearing site settings on shutdown clears the cookie permission. But the cookie permission was not cleared prior to bug 1767271. I'll atttach how it looked before (good.mp4) and current behavior (bad.mp4) to this bug.
Comment 6•2 months ago
|
||
Comment 7•2 months ago
|
||
Updated•2 months ago
|
Comment 9•2 months ago
|
||
Set release status flags based on info from the regressing bug 1767271
:emz, since you are the author of the regressor, bug 1767271, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 10•2 months ago
•
|
||
(In reply to Manuel Bucher [:manuel] from comment #5)
I was able to reproduce with steps provided in comment 4.
clearing site settings on shutdown clears the cookie permission. But the cookie permission was not cleared prior to bug 1767271. I'll atttach how it looked before (good.mp4) and current behavior (bad.mp4) to this bug.
Clearing the cookie permission when "site settings" clearing is selected is expected behavior. The only reason the cookie permission was exempt in the past is that it acted as the clearing exception permission itself. Now that the clearing permission is a dedicated permission only that gets protected. Does this make sense? :-)
The cookie permissions (after the refactor) is now considered a regular permission which we consider a "site setting".
Updated•2 months ago
|
| Reporter | ||
Comment 11•2 months ago
|
||
(In reply to Emma Zühlcke [:emz] from comment #10)
(In reply to Manuel Bucher [:manuel] from comment #5)
I was able to reproduce with steps provided in comment 4.
clearing site settings on shutdown clears the cookie permission. But the cookie permission was not cleared prior to bug 1767271. I'll atttach how it looked before (good.mp4) and current behavior (bad.mp4) to this bug.
Clearing the cookie permission when "site settings" clearing is selected is expected behavior. The only reason the cookie permission was exempt in the past is that it acted as the clearing exception permission itself. Now that the clearing permission is a dedicated permission only that gets protected. Does this make sense? :-)
The cookie permissions (after the refactor) is now considered a regular permission which we consider a "site setting".
From previous documentation, allowed exceptions should be honored in combination with "Clear cookies and site data every time you close Firefox". Har this been changed? Also, is there a discrepancy between excemption made pre-154 and new ones? Like the old ones being restored on restarting firefox and new ones disappear after restart.
Comment 12•2 months ago
|
||
Comment 13•2 months ago
|
||
There is now a dedicated section for specifically clear on shutdown exceptions. Those don't get cleared when you clear "site settings" on shutdown. We ran a migration to copy existing cookie permissions over there. The other exceptions under "Browsing data" on about:preferences#privacy should only be used to allow or block cookie access for websites.
| Reporter | ||
Comment 14•2 months ago
|
||
(In reply to Emma Zühlcke [:emz] from comment #13)
There is now a dedicated section for specifically clear on shutdown exceptions. Those don't get cleared when you clear "site settings" on shutdown. We ran a migration to copy existing cookie permissions over there. The other exceptions under "Browsing data" on about:preferences#privacy should only be used to allow or block cookie access for websites.
Oh, I see now. Its moved from "Browsing data → Managed exceptions" to "History → Customize history → Manage exceptions". Works for me! I think it can be confusing with cookie exceptions in both places.
From 154 release notes:
- Sites can now be exempted from having their cookies and site data cleared on shutdown without also being exempted from tracking protection and other cookie restrictions.
Is this more a usability issue more than technical?
Comment 15•2 months ago
•
|
||
Somewhat yes, but also a bit unexpected. Most of the unexpected part is that previously the exceptions were configuring exactly through the "Manage exceptions" box in the settings. And that we have the checkbox "Clear cookies and site data on shutdown" right below.
What is confusing too is that we have the "Allow for session" and "Allow" in the "Manage Exceptions" dialog, but both get cleared when clearing site settings is enabled.
So I believe it would be good to improve the UX here to reduce confusion.
Some improvements that I think we could do here are:
- Clarify what "Manage Exception" means and add buttons to the top-level menu for both previous mechanisms
- Rename the current "Manage exceptions" to something like "Manage per site cookie behavior"
- Add a "Manage exceptions to clear on shutdown" button to the high
- Indicate in the Settings UI that the settings are ephemeral when clearing site settings on shutdown is enabled
Comment 16•2 months ago
|
||
+1 on the UX issues. I've repurposed the bug for that.
(In reply to Trond Olsen from comment #14)
From 154 release notes:
- Sites can now be exempted from having their cookies and site data cleared on shutdown without also being exempted from tracking protection and other cookie restrictions.
Is this more a usability issue more than technical?
It's mostly technical actually. Before if you exempted a site from having its cookies cleared on shutdown it would also get an exception for cookie restrictions (for anti tracking). Now that's separate. So if you exempt the site from shutdown clearing its still treated as any other site when it comes to things like Total Cookie Protection, tracking protection etc.
Updated•2 months ago
|
Comment 17•2 months ago
|
||
Bugzilla is acting weird. I'm trying to make this an enhancement.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 19•2 months ago
|
||
Please consider my comment as also written here as it also perfectly pertains here.
The devs suggested I write here.
Comment 20•2 months ago
|
||
The cookie whitelist getting erased if "Clear history when Firefox closes" and "Site settings" are selected is a mistake.
Are the cookie exception settings considered "site settings" of the about:preferences page? Why so? How do they belong to a page or site? Most people don't understand that the Preferences page is technically a page, nor should they have to. It's a preferences view in a desktop program and that's all. The preferences should go into prefs.js.
Even if you resort to using cookies for some technical reason not mentioned here, it should still not be erased because it's not a site setting.
If you clear it intentionally, it's still wrong, because it's not site data, not generated by websites, but by the user setting certain things.
On the whitelist UI there is an implicit promise of settings lasting forever if you click the Allow or Deny buttons and lasting a session if you click "Allow for Session". Failure to understand this will cause a lot of user frustration and lot of people to leave the browser.
Comment 21•2 months ago
|
||
(In reply to v_ from comment #20)
The cookie whitelist getting erased if "Clear history when Firefox closes" and "Site settings" are selected is a mistake.
Are the cookie exception settings considered "site settings" of the about:preferences page? Why so? How do they belong to a page or site? Most people don't understand that the Preferences page is technically a page, nor should they have to. It's a preferences view in a desktop program and that's all. The preferences should go into prefs.js.
Even if you resort to using cookies for some technical reason not mentioned here, it should still not be erased because it's not a site setting.
If you clear it intentionally, it's still wrong, because it's not site data, not generated by websites, but by the user setting certain things.
On the whitelist UI there is an implicit promise of settings lasting forever if you click the Allow or Deny buttons and lasting a session if you click "Allow for Session". Failure to understand this will cause a lot of user frustration and lot of people to leave the browser.
Cookie permissions are considered site settings (just like any other permission). They belong to the site they’re set for. Not preferences.
What specifically are you looking to clear with “site settings”? Would it be an option to just not select that category for clearing?
Comment 22•2 months ago
|
||
I realized this in hindsight and apologize.
I see these cookie settings as being central preferences and the clearance of site settings corresponding to invisible settings that the user can't simply delete, he/she/they would have to visit each site to accomplish it.
I unchecked it for the time being but I'd prefer it or another setting to only clear "invisible" site settings, that act more like a history. Maybe a separate checkbox or about:config entry could solve this?
Comment 23•2 months ago
|
||
As you note we do have two different categories of permissions. We have what I would call "site permissions" that are exposed through the UI, though preferences, page info, permission panel. https://permission.site shows most of them. The remaining permissions are what you called "invisible" site settings. They're used by various components throughout the codebase. They're not exposed via our standard perm management UIs, or possibly any UI at all.
Note that site settings encompasses more than just permissions. See https://searchfox.org/firefox-main/rev/61c7b6d2fe5fc598e573df6528447ab48bc027b3/browser/modules/Sanitizer.sys.mjs#675-697 .
It's really difficult to draw the line and at the same time keep the clearing categories simple enough. Possibly in the future we could have an advanced view with more granularity.
Comment 26•1 month ago
|
||
After upgrading to 156.0.1 the previously manually added exceptions are gone again.
Privacy & Security -> History -> Customize History -> Choose what to keep -> Manage exceptions.
Comment 27•1 month ago
|
||
Come to think of it, i have used CTRL-SHIFT-DEL everything + Site Settings so that might be the cause here (if that is an expected reset of these settings).
Comment 28•1 month ago
|
||
(In reply to ronny tyink from comment #27)
Come to think of it, i have used CTRL-SHIFT-DEL everything + Site Settings so that might be the cause here (if that is an expected reset of these settings).
see Bug 1658094 FF129+ (jump to comment39)
- where the cleaning logic was split into
PermissionsCleanerand aClear on shutdown exceptions cleaner
There are three "sanitizing" settings
-
privacy.clearOnShutdown_v2.*is specifically clearing on close
- Privacy and security>History>Customize history>Choose...>Settings
-
privacy.clearHistory.*
- is Ctrl-Shift-Del
-
privacy.clearSiteData.*
- Privacy and security>Browsing data>Clear browsing data
My understanding is that all three, when clearing "site settings", don't clear exceptions for clearing on close (but it will clear things like zoom levels, permissions and so on). The exception used to be ACCESS_ALLOW and since FF154 is now persist-data-on-shutdown (this was the migration in Bug 1767271). Without looking, I would assume the Clear on shutdown exceptions cleaner uses the persist-data-on-shutdown. And it does that for all three ways to "sanitize"
You will need to test if there is a regression - assuming that I am/was right about all three ways to sanitize should except the persist-data-on-shutdown exception
Comment 29•1 month ago
|
||
Tested this on FF 156.0.1 / Win10x64 ESU.
Only close on exit remembers the exception, the other two erase the exceptions if "site settings" is ticked.
Comment 30•1 month ago
•
|
||
thanks for testing ... I forgot (it's been a while) and I misread my notes - that's Bug 1769327 (cpd was the old ctrl-shift-del preferences - edit: I renamed the bug) - as emma said, nice to have
Comment 32•14 days ago
|
||
I'd like to add my +1 to the UX being confusing for configuring data clearing on shutdown (which I think this bug is about now, per comment #16). I hope my notes below are useful for improving this.
Confusing bits
- Most of the "Browsing data" box on
about:settings#privacyis about clearing data after the fact, but its "Manage exceptions" button is not. That's odd, because you'd think they'd be exceptions to what the rest of the settings in that box are about. - Relatedly, if you have enabled "Clear cookies and site data every time you close Firefox" in the "Browsing data" box, its exceptions are not managed by the "Manage exceptions" next to it, but by "Manage exceptions" in the "Advanced Settings" of a different box. (What adds to the confusion, is that the exceptions previously were managed by the near button.)
- The "History" box on
about:settings#privacyis not about what I would think of when I hear of "history" in the context of a browser, which is the list of pages that I have visited in the past. - I think the text "Customize what you want Firefox to remember when you close the browser" on
about:settings#historymight be misleading for "Always use private browsing mode", "Remember browsing and download history", and "Remember search and form history", since I think those would have effects before the browser is closed.
Suggestion
Based on my limited, non-expert, current understanding, I think "clear stuff now", "remembered during the session", and "clear when closing the browser" could allow a straightforward organization of the settings. Retaining the three way remember/customize/private choice, I think that could lead to the following:
- A box "Clear browsing data and history now" on
about:settings#privacy, containing- text like "Clear your cookies, history, cache, website data, and more",
- the disk usage,
- the "Clear browsing data button" button,
- the "Clear data for specific sites" button,
- no exception management, and
- no setting about behavior on shutdown.
- A box "Browsing data and history" on
about:settings#privacy, containing- text like "Choose what you want Firefox to remember during the session and when you close the browser",
- radio buttons "Remember history and site data", "Always private", and "Customize", and
- a button linking to
about:settings#history(renamed perhaps?) under "Customize".
- A box "Always private" on
about:settings#history(as renamed), containing- the radio button "Always use private browsing mode", as now, that disables the rest of the page, and toggles from "Customize" to "Always private" in the "Browsing data and history" box on
about:settings#privacy.
- the radio button "Always use private browsing mode", as now, that disables the rest of the page, and toggles from "Customize" to "Always private" in the "Browsing data and history" box on
- A box "During the session" on
about:settings#history(as renamed), containing- the checkbox "Remember browsing and download history" (with "during the session" added?),
- the checkbox "Remember search and form history" (with "during the session" added?),
- text noting that some cookies and site data are always remembered during the session, with a "Manage exceptions" button for the "Allow"/"Allow for Session"/"Block" options.
- A box "On shutdown" on
about:settings#history(as renamed), containing- the checkbox "Clear cookies and site data every time you close Firefox", if that has to be retained, and the current "Clear history when Firefox closes" checkbox with its settings,
- or directly the checkboxes currently in the "Clear history when Firefox closes" settings,
- and, in either case, the button for the exception management.
Context
I have a browser profile that forgets cookies and site data on shutdown except for a few allowlisted sites. When I tried to allowlist an additional site, I added it to the exceptions under "Browsing data", as I had done before, but this did not have the desired effect. Reading code, looking for bug reports, and noticing that Services.perms.getAllByTypes(["persist-data-on-shutdown"]).map(perm => perm.principal.host) in the Console of about:settings did not show the site that I had added, let me to the other exception management dialog. That should not have been that hard.
Current situation
To avoid confusion when settings move around, here are the settings that I'm currently seeing (on Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0 on Raspberry Pi):
- a "Browsing data" box on
about:settings#privacycontaining the following:- disk usage text,
- a "Clear browsing data" button, leading to a "Clear browsing data and cookies dialog" allowing time-based deletion in five categories ("browsing and download history", "cookies and site data", "temporary cached files and pages", "saved for info", and "site settings"),
- a "Clear data for specific sites button", leading to a "Manage Cookies and Site Data" dialog, allowing site-based deletion of cookies and site data,
- a "Manage exceptions" button with subcaption "Choose how specific sites handle cookies and site data.", leading to an "Exceptions - Cookies and Site Data" dialog, with options "Allow for Session", "Allow", and "Block" per site, and
- a "Clear cookies and site data every time you close Firefox" checkbox,
- a "History" box on
about:settings#privacycontaining the following:- text "Chose what you want Firefox to remember when you close the browser",
- radio boxes "Remember history", "Customize history", and "Never remember history" (with "Every window acts like a private window. When on, extensions need to be allowed"),
- a button "Choose what you want Firefox to remember" under the "Customize history" radio box, leading to
about:settings#history, and
- an "Advanced settings" box on
about:settings#history, containing- the text "Customize what you want Firefox to remember when you close the browser",
- a checkbox "Always use private browsing mode",
- a checkbox "Remember browsing and download history",
- a checkbox "Remember search and form history", and
- a checkbox "Clear history when Firefox closes", with below it
- a button "Settings..." where the five categories from before can be selected for clearing when the browser is shut down, and
- a button "Manage Exceptions" where sites can be exempted from that clearing.
Enabling the checkbox "Clear cookies and site data every time you close Firefox" sets the history radio button to "Customize history", in there enables "Clear history when Firefox closes", and in there enables the "Cookies and site data" and "Temporary cached files and pages" categories. Disabling it, disables "Clear history when Firefox closes".
Conversely, when both "Cookies and site data" and "Temporary cached files and pages" get enabled under "Clear history when Firefox closes", "Clear cookies and site data every time you close Firefox" gets enabled. When one of them gets disabled, "Clear cookies and site data every time you close Firefox" gets disabled.
I think the radio button "Never remember history" and the checkbox "Always use private browsing mode" have the same effect.
Description
•