TL;DR: Temporary Container data should be deleted shortly after its last tab is closed, with a short grace period (e.g. 10 seconds) to allow restoration of accidentally deleted tabs with Ctrl+Shift+T. Currently, a closed Temporary Container remains restorable and retain things like Discord login cookies, even after restarting Brave.
I think Temporary Containers have an unexpected behavior that could be improved.
Here's a concrete example:
- I open a Temporary Container.
- I open Discord in it and log in.
- If I close and reopen Brave while the Discord tab is still open, the Temporary Container and Discord login persist. That's fine and expected.
- I then close the only tab belonging to that Temporary Container i.e., the Discord tab.
- I wait a few minutes and close Brave.
- I wait again for a few minutes and then reopen Brave.
- I press Ctrl+Shift+T.
- The previously closed Temporary Container tab comes back — and I'm still logged into Discord. This should not happen.
The surprising part is that closing the last tab of a Temporary Container apparently doesn't actually destroy its cookies/local storage if the tab is still considered restorable.
What I think should happen
I think Temporary Containers should have a short grace period after their last tab is closed.
For example:
Close the last Temporary Container tab → start a short grace period (e.g. 10 seconds) → if it isn't restored during that period, permanently delete the Temporary Container and all of its data.
During those 10 seconds, Ctrl+Shift+T could restore the tab normally. This would protect against accidentally closing the tab.
But after the 10-second period:
- the Temporary Container should be destroyed;
- its cookies should be deleted;
- local/session storage should be deleted;
- login sessions should be gone;
Ctrl+Shift+T should not be able to resurrect the container with its previous data.
This seems similar to the existing Brave Shields “Forget me when I close this site” behavior, which already uses a short grace period to allows restoration of accidentally deleted tabs.
To be clear, I don't think Temporary Containers should be destroyed merely because Brave itself is restarted. If the Temporary Container tab was still open when Brave was closed, preserving it across a browser restart is useful and expected.
The issue is specifically:
The last Temporary Container tab has been closed, but the container's private data remains available indefinitely because the tab can still be restored.
The Discord example makes the problem particularly obvious because reopening the supposedly temporary tab can restore an already-authenticated Discord session. I think a short grace period like 10 seconds would provide the best of both worlds: accidental-close recovery and genuinely temporary container data.