[Desktop] Allow users to add site exceptions for data that is cleared "on exit"
Description
As it is now, any data type that is checked in the Clear browsing data --> [On exit] will have all data of that type removed upon closing the browser. While this is the intended function, we should implement a function similar to what Microsoft Edge does, where site exceptions can be added to a "Do not clear" list. Data on this list is ignored when the browser runs "clear on exit":

This would help users maintain login data for sites they regularly visit and not have to re-authenticate every time data is erased. Additionally, this helps with support, since clearing browsing data often resolves issues with bad cache data -- having the ability to suggest users do this, but without sacrificing specific data they know they want would be very useful and appreciated by users
Miscellaneous Information:
Original thread that bought this to my attention (again): https://community.brave.com/t/delete-all-cookies-on-exit-except-allowed-list/137872/5
Dear sir what could I do if I lost my rewards bookmarks and settings also and password as the main character . Using a mobile Android based brave browser
Dear sir what could I do if I lost my rewards bookmarks and settings also and password as the main character . Using a mobile Android based brave browser
@irfaneru you're going to want to post on https://community.brave.com/ or search GitHub for a related issue. This issue is tracking a feature request for clearing data on exit
This is such a simple yet crucial feature for a privacy focused browser that can still be used conveniently.
There's definitely demand for this very helpful feature, as it is constantly requested, as f.i.
https://community.brave.com/t/cookie-whitelist/82489 https://community.brave.com/t/clear-cookies-and-site-data-when-you-quit-brave-not-working-consistently/112651/3 https://community.brave.com/t/cookies-delete-in-all-sites-problem/128814 https://github.com/brave/brave-browser/issues/5089
This would really help a lot of people achieve better security, I'm sure more people would use the delete cookies on exit feature if you were able to add exceptions
Please add this feature! Ecosia.org search engine asks for captcha verification every time i open the brave browser because te cookies are deleted on exit! Github asks for login etc etc. Thanks a lot for providing brave, it's about time we take privacy seriously!
Almost April 2021. Is this still on the go?
Definitely add this feature. The absence of this feature is the only thing stopping me from making Brave the only browser I use.
+1 https://community.brave.com/t/is-there-a-way-to-retain-a-list-of-specific-cookies-on-exit-when-clear-cookies-on-exit-is-enabled/266646/2
agreed, feature worth moving up the list of priority, I would like to have security of Clear All on exit with exception cookies in domains to keep logins I use frequently, thank you
+1 from Community: https://community.brave.com/t/selecting-what-cookies-to-keep-and-delete-all-others/283635/2?u=mattches
+1 from Community: https://community.brave.com/t/save-cookies-for-specific-websites-possible/288464
This feature is already present in Mozilla Firefox, MSEdge and I would love to see it in Brave browser as well. Its a most needed feature. MSEdge

Mozilla firefox

I may be wrong, but I'm getting the feeling this feature is already implemented, albeit it's not as intuitive as it is on the other browsers. Like @Hooregi and many others, I have been using Cookie AutoDelete so far but decided to do a test in a different profile, and I've found that on Brave v1.33.106 the Customized behaviors section does indeed override global cookie settings (as it should).
Example 1. If you block all cookies and add websites to the Sites that can always use cookies or Always clear cookies when windows are closed sections, those websites will indeed have the expected behavior and be able to use cookies as configured.
Example 2. If you check Allow all cookies or Block third-party cookies, enable Clear cookies and site data when you close all windows box and add websites to the Sites that can always use cookies section, those websites' cookies will persist between sessions.
I may be wrong, but I'm getting the feeling this feature is already implemented, albeit it's not as intuitive as it is on the other browsers. Like @Hooregi and many others, I have been using Cookie AutoDelete so far but decided to do a test in a different profile, and I've found that on
Brave v1.33.106the Customized behaviors section does indeed override global cookie settings (as it should).Example 1. If you block all cookies and add websites to the
Sites that can always use cookiesorAlways clear cookies when windows are closedsections, those websites will indeed have the expected behavior and be able to use cookies as configured.Example 2. If you check
Allow all cookiesorBlock third-party cookies, enableClear cookies and site data when you close all windowsbox and add websites to theSites that can always use cookiessection, those websites' cookies will persist between sessions.
You are right, those are the settings. I don't know why the other people keeps saying there is no an actual setting to delete certain cookies and to keep others.
You are wrong @joaopenteado.
The goal is that the "Always clear cookies when windows are closed" function always deletes all cookies except for sites specifically added as exceptions by user.
-
"Example 1" requires to "block all cookies " which is impractical since some sites do not function without cookies. Manually adding those sites does not make sense either since not all of them must be kept after browser restart.
-
Tested "Example 2" in Brave v1.33.106, cookies got deleted even for sites added under "Sites that can always use cookies" after restarting Brave.
You are wrong @joaopenteado.
The goal is that the "Always clear cookies when windows are closed" function always deletes all cookies except for sites specifically added as exceptions by user.
- "Example 1" requires to "block all cookies " which is impractical since some sites do not function without cookies. Manually adding those sites does not make sense either since not all of them must be kept after browser restart.
- Tested "Example 2" in Brave v1.33.106, cookies got deleted even for sites added under "Sites that can always use cookies" after restarting Brave.
Are you sure? I've just rebooted my machine and tested again and it seems to be working as intended.
100% sure, "Sites that can always use cookies" does not override "Clear cookies and site data when you close all windows" as you state... Even after restarting my Linux machine...
I've tested it on my Windows 11 and macOS machines and got the expected behavior without any issues. Unfortunately, I don't have a Linux machine at hand anymore to test it over there, but it might be some inconsistent behavior across different OSes or some extension conflict on your end (on my end I've made sure to use clean profiles for testing). It would be nice if we got a few more people to test this behavior on different OSes and post their findings here.
I think it might be worth considering reclassifying this issue as a bug fix rather than a new feature. We only need to make sure that the Customized behaviors for certain websites will always override the Clear cookies and site data when you close all windows and Block all cookies settings. The only enhancement that could be made would be maybe tweaking the UI to be little more similar to what is found on most other browsers, but that is very subjective "improvement".
You're right, creating a new profile fixed it for me. Good job @joaopenteado ! Tweaking the UI would definitely be appreciated though.
So, I followed the advice to set up a new profile to test this and you all are absolutely right. It is a feature.
If I set Clear cookies and site data when you close all windows to on and add sites to Sites that can always use cookies those will not be deleted.
My problem came from setting Clear browsing data -> On exit -> Cookies and other site data, that's the one which isn't overwritten by the site exceptions. Thank you everyone!
Example 1. If you block all cookies and add websites to the
Sites that can always use cookiesorAlways clear cookies when windows are closedsections, those websites will indeed have the expected behavior and be able to use cookies as configured.
I can confirm that this works, but it is confusing and not user-friendly, in my opinion. Brave could do what Edge is doing, keeping a list of URLs whose data the user wants to preserve and deleting the data of every other website.
Having to sign in to websites that are visited frequently, especially those with 2FA enabled, is very annoying and does not improve security in any way.
+1 from Community: https://community.brave.com/t/deleting-cookies-on-exit-with-exceptions/359863/2
No work on this still yet ?
@developomp Thanks the method works.
+1!!
I think I understand what is happening now and why people are getting inconsistent results. There are two places to clear cookies on exit:
-
Settings > clear browser data > switch to the "on exit" tab > "cookies and other site"
-
Settings > privacy and security > cookies and other site data > clear cookies and site data when you close all windows. It is a toggle.
If you have the setting>clear browser data > on exit > "cookies and other site data" selected then it clears everything on exit -- including any sites you have in your "sites that can always use cookies".
To fix the issue, uncheck the field at: settings> clear browser data > on exit > "cookies and other site data". Then go to: settings > privacy and security > cookies and other site data > "clear cookies and site data when you close all windows". Here, keep the toggle set to "on".
This clears of the conflict between the two settings and keeps the cookies that are always set to on.
Example 1. If you block all cookies and add websites to the
Sites that can always use cookiesorAlways clear cookies when windows are closedsections, those websites will indeed have the expected behavior and be able to use cookies as configured.I can confirm that this works, but it is confusing and not user-friendly, in my opinion. Brave could do what Edge is doing, keeping a list of URLs whose data the user wants to preserve and deleting the data of every other website.
+1, couldn't put it better, using the opportunity to bump the issue.
Been nearly 3 years since I posted this on the brave forum.
Still no change. Having clear privacy controls is table stakes for a privacy browser.