brave / brave-browser

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

Clear cookies in private+Tor window? Completely restart private+Tor window preserving open tabs? #3872

Open rulatir opened 5 years ago

rulatir commented 5 years ago

Description

I am unable to discover a method for clearing cookies in a private+Tor window.

The regular Brave browser allows this with [Main menu / settings] -> [Left sidebar / Advanced / Privacy and security] -> [Clear browsing data] (NOTE WELL: these menu item labels are backtranslated from Polish, they may be slightly different in English).

The private+Tor window does not have the Advanced submenu in the left sidebar of the settings page, therefore the UI to clear cookies is inaccessible.

How do I clear cookies in private+Tor window? ALTERNATIVELY, how can I restart a private+Tor window without losing open tabs?

Since I will obviously be asked the question "why do you want to do this in the first place", here's the answer: I noticed that sometimes when I receive "Try again later" from ReCaptcha, changing the Tor identity doesn't resolve the issue, but restarting the browser (which clears cookies) does. I also notice that various cookies DO get sent along with the whole chain of requests that end with the "Try again later" response from ReCaptcha after changing the Tor identity, but some of those cookies don't get sent after full browser restart.

What I want is an equivalent of full browser restart with respect to resetting all aspects of the browser's internals state that affect the shape of requests sent by the browser, but I want to be able to perform this reset without losing open tabs.

Miyayes commented 5 years ago

ALTERNATIVELY, how can I restart a private+Tor window without losing open tabs?

Doesn't this entail recording your browsing history? One of the core elements of a Private Window is that it does not retain your browsing history. So, a feature like this seems to be entirely at odds with what Private Windows fundamentally are.

For example, try closing a tab in a Private Window and then pressing CMD/CTRL + SHIFT + T to resurrect it like you normally would. You will notice that you can't because the Private Window doesn't keep track of your browsing history.

rulatir commented 5 years ago

Doesn't this entail recording your browsing history?

Not if done cleverly. One could imagine a cooperative implementation where the old process somehow sends the URL list directly to the new process using an encrypted channel, and doesn't store the history anywhere. But this would still just be a workaround. What I need is to achieve the same DEPTH of reset as a full restart WOULD. It does not need to entail an actual full restart.

srirambv commented 5 years ago

How do I clear cookies in private+Tor window?

Tor window is a guest window so there is no data stored to disk. Once the window is closed its lost. There is no way to retain history/tabs if the window is accidentally closed.

May be once we have Tor persistent profiles (#1115) created this might be fixed.

rulatir commented 5 years ago

@srirambv, please, let's not focus on the "restart with tabs" thing, the "recover last session" thing etc. This question is NOT about that. My main question is: how do I clear cookies in a private+Tor window? The UI for that is absent.

I managed to use the Application page in devtools to successfully clear cookies for a domain, but I think I shouldn't have to use devtools for this purpose.

srirambv commented 5 years ago

@rulatir as mentioned before data is cleared when the window is closed. I don't think we need a UI to clear data for Tor windows.

cc: @tomlowenthal

riastradh-brave commented 5 years ago

What you ask for should be doable with New Tor Identity, except it is currently partly broken and doesn't discard the data that it ought to discard.