brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.04k stars 2.22k forks source link

[Desktop] Allow users to add site exceptions for data that is cleared "on exit" #10493

Open Brave-Matt opened 4 years ago

Brave-Matt commented 4 years ago

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":

image

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

irfaneru commented 4 years ago

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

bsclifton commented 4 years ago

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

RealExony commented 3 years ago

This is such a simple yet crucial feature for a privacy focused browser that can still be used conveniently.

sojusnik commented 3 years ago

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

luke-shields commented 3 years ago

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

manolismih commented 3 years ago

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!

VegaDark commented 3 years ago

Almost April 2021. Is this still on the go?

dmarchlinski commented 3 years ago

Definitely add this feature. The absence of this feature is the only thing stopping me from making Brave the only browser I use.

Brave-Matt commented 3 years ago

+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

bzdzz commented 2 years ago

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

Brave-Matt commented 2 years ago

+1 from Community: https://community.brave.com/t/selecting-what-cookies-to-keep-and-delete-all-others/283635/2?u=mattches

Brave-Matt commented 2 years ago

+1 from Community: https://community.brave.com/t/save-cookies-for-specific-websites-possible/288464

aystic commented 2 years ago

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

image

Mozilla firefox

image

joaopenteado commented 2 years ago

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.

VegaDark commented 2 years ago

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.

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.

sbucek commented 2 years ago

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.

joaopenteado commented 2 years ago

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.

sbucek commented 2 years ago

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...

joaopenteado commented 2 years ago

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".

sbucek commented 2 years ago

You're right, creating a new profile fixed it for me. Good job @joaopenteado ! Tweaking the UI would definitely be appreciated though.

v3natio commented 2 years ago

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!

joeljosedev commented 2 years ago

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.

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.

Brave-Matt commented 2 years ago

+1 from Community: https://community.brave.com/t/deleting-cookies-on-exit-with-exceptions/359863/2

IkelAtomig commented 1 year ago

No work on this still yet ?

developomp commented 1 year ago

No work on this still yet ?

You can use this method for now.

IkelAtomig commented 1 year ago

@developomp Thanks the method works.

Kruln commented 1 year ago

+1!!

KOHPMC commented 1 year ago

I think I understand what is happening now and why people are getting inconsistent results. There are two places to clear cookies on exit:

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.

onchov commented 1 year ago

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.

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.

marcodenic commented 1 year ago

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.

ASweatyPenguin-1 commented 1 year ago

This seems like a very basic feature to implement. This issue has been open a long time, a lot of other browsers have it, I'm considering using brave, but I need this feature.

AManNeedsAMaid commented 1 year ago

How is this still an issue?

How do you expect users to use Progressive Web Apps from within brave if you can't exclude certain sites from clearing cookies on exit?

EDIT: after reading the above solution, isn't this issue as simple as merging the "Clear cookies and site data when you close all windows" option into the On Exit options. Don't both of those toggles do essentially the same thing?

Brave-Matt commented 1 year ago

+1 from Community: https://community.brave.com/t/cannot-save-cookies-for-specific-websites-like-search-brave-com-if-delete-cookies-on-exit-is-on/496269/3

port19x commented 11 months ago

This is a really important feature for keeping some comfort with the increased privacy of clearing everything on exit

CaptTom9 commented 10 months ago

I just tried to start using Brave. So far, pretty good. Until I noticed that there's no (straightforward) way to exclude domains from having cookies cleared on exit. Or, if the workaround referenced above does work, it's not at all clear that's the intended result, based on the wording and layout of the settings dialog.

I'm amazed at how long this appears to have been a problem with Brave. This is core stuff. All the other browsers do this. Having this outstanding for so long makes Brave look like a third-rate wannabe browser. I think this will be the end of my trial of Brave.

chuzmunguz commented 9 months ago

+100!!

I've been on the fence for several days now to move from Firefox to Brave, and this is such a basic feature and a major issue that seems to be around for so long, that I question the real motivation of brave developers and their commitment to the privacy-oriented community. The browser is full of crap-features like VPN, BAT, WEB3 stuff, ads, etc., but lack such a basic feature that allies privacy with convenience. If I could get extensions on Android, I would let this pass, but that's not even possible, so I can't get the Cookie AutoDelete extension to achieve what all other browsers can do natively. Unfortunately, I'm writing this on LibreWolf, and will stick with Mull browser on Android until the issue is fixed.

AManNeedsAMaid commented 9 months ago

+100!!

I've been on the fence for several days now to move from Firefox to Brave, and this is such a basic feature and a major issue that seems to be around for so long, that I question the real motivation of brave developers and their commitment to the privacy-oriented community. The browser is full of crap-features like VPN, BAT, WEB3 stuff, ads, etc., but lack such a basic feature that allies privacy with convenience. If I could get extensions on Android, I would let this pass, but that's not even possible, so I can't get the Cookie AutoDelete extension to achieve what all other browsers can do natively. Unfortunately, I'm writing this on LibreWolf, and will stick with Mull browser on Android until the issue is fixed.

Agreed, especially lazy for a browser with its own customized settings page. Adding cryptocrap without addressing basic missing features is a terrible look.

CaptTom9 commented 9 months ago

UPDATE: There are two different settings for clearing cookies (on exit, and when closing all windows.) I need to do some more research to figure out what each one really does. But for the testing I've been doing, I didn't have "on exit" selected, which is what I thought I was testing.

Well, I didn't give up on Brave after all. I've been testing the workaround: Settings / Privacy & Security / Cookies and other site data / Sites that can always use cookies It seems that adding domains there does maintain their cookies between sessions. I'm still testing, and there are a few other quirks but at least the big hurtle seems to be behind me - the need to clear all cookies on exit except those sites I specify. I'm not sure why that's not explained and labeled better though.

chuzmunguz commented 9 months ago

I appreciate the tip on how to manage to get the exceptions on the desktop app, and maybe it can help other people, but I was already aware of it before I wrote my previous comment. The problem is that it seems that the Android app don't have the same option. I really would like to be able to sync browsing data on both desktop and mobile platforms (there has to be a balance between privacy and usability), but, at the present time, it looks like the behavior in the Android app is that all cookies are deleted when you select Clear data on exit, without an option to define exceptions.

I also tested the scenario: Settings / Brave Shields & privacy / Clear data on exit : disabled Settings / Brave Shields & privacy / Forget me when I close this site : enabled, with the exception added to the site Brave Shield while visiting it.

In theory, the end result for a single site would be the same for both scenarios. The problem is that with this method, some cookies persist between sessions, and that is not acceptable.

aystic commented 9 months ago

I am using the following settings on Brave desktop and they seem to work fine

CaptTom9 commented 9 months ago

To be clear, there are two settings which seem to apply here:

1) Settings / Privacy and Security / Clear Browsing Data / On Exit / Cookies and Other Site Data (check box)

2) Settings / Privacy and Security / Cookies and other site data / Clear cookies and site data when you close all windows (toggle button)

My next project will be to do some experiments with each setting, which means testing four different possibilities (both on, both off, one on, the other on.)

I'm wondering what "close all windows" really means. I don't usually run with more than one browser window open. That's what tabs are for. So for me, "on exit" means the same as "close all windows." I'm guessing I've misunderstood and there's another distinction Brave is making here. Having those two options in two different places also implies a different purpose.

Feel free to run the same tests and post what you find.

I'm primarily testing the desktop version. I don't like to sync settings with my mobile devices, so I won't be looking at that issue.

Brave-Matt commented 8 months ago

+1 from Community: https://community.brave.com/t/customized-behavior-still-clears-every-time-i-close-and-restart-the-brave-browser/511649/3

EriOldMan commented 7 months ago

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.

I followed these steps but still had the issue. After trying everything I found out that you also need to uncheck: clear browser data > on exit > "Site and Sheilds Settings"

sbucek commented 7 months ago

@EriOldMan I have the same exact settings but still some sites get their cookies deleted despite being in the "Sites that can always use cookies" section. This feature is not user friendly and completely unreliable as it is at the moment. It should be bulletproof.

EriOldMan commented 7 months ago

@sbucek That's odd. I agree but it's better than nothing for now.

CaptTom9 commented 7 months ago

This feature is not user friendly and completely unreliable as it is at the moment.

I couldn't agree more. I think I've got it set OK now, but I'm not sure I'm clearing all the cookies I want. Sometimes sites seem to "remember" things I didn't expect them to. Using a browser shouldn't require in-depth analysis of what's being saved and what isn't. There should be clear, unambiguous options to clear all cookies on exit, and a clear way to identify exceptions in the same option setting dialog.

Oh, and when I went to try to set the same options on the Android version, nothing looked familiar. I gave up and returned to the browsers I'd been using before. This is really a shame. Brave could be a real star in the browser world!

jlford commented 5 months ago

+1 from community member, I'd really love to see this feature added, thank you!

sbucek commented 5 months ago

Did anyone test the "Forgetful Browsing" browser feature in Brave ( https://brave.com/privacy-updates/25-forgetful-browsing/ ) ?

Seems to be a much better alternative to "clean on exit" as it removes site data already when closing the tab and can easily be configured for any specific site by activating the option in the navigation bar.

A clearer and more coherent integration between those 2 would be great though.

IkelAtomig commented 5 months ago

There is no option where I can edit Sites that can use cookies while as others are cleared by this :

brave://settings/cookiesClear cookies and site data when you close all windows

Brave seems to have removed the option in a new update. Kind of annoying as I cannot edit it or turn off so other sites can use cookies for login, and making me re-login again and again.

onchov commented 5 months ago

There is no option where I can edit Sites that can use cookies while as others are cleared by this :

brave://settings/cookiesClear cookies and site data when you close all windows

Brave seems to have removed the option in a new update. Kind of annoying as I cannot edit it or turn off so other sites can use cookies for login, and making me re-login again and again.

I think it got moved to Settings > Privacy and security > Site and shields settings > Additional content settings > On-device site data, then you choose the middle option (Delete data sites that have been saved to your device when you close all windows) and define the exceptions below.

The above is not synchronised with the forgetful browsing mentioned in https://github.com/brave/brave-browser/issues/10493#issuecomment-1915303103 though, so not sure what the Brave team's idea is.