Browsing data not cleared on exit
Description
Everything is checked under 'Settings'/'Clear Browsing Data'/'On exit', but after shutting down the browser/os, re-opening and navigating to twitter.com, avatar + username of previous login appears together with some error messages saying "Something went wrong". After reloading the page, previous login disappears and a clean login page is displayed. Manually clearing all browsing data (all time) produces the same results. All other data/history seems to be cleared.
(browsing data don't re-appear if the service worker on twitter.com is unregistered between step 1 and 2)

Steps to Reproduce
- Login to twitter.com in a new window
- Close the window
- Clear all browsing data
- Open a new window and navigate to twitter.com
Reproduces how often:
Every time the steps to reproduce are followed
Brave version (brave://version info)
| Brave | 1.16.72 Chromium: 86.0.4240.183 (Official Build) (x86_64) |
|---|---|
| Revision | 0b568b034b8f7994697cb341eeca5979b84151cc-refs/branch-heads/4240@{#1374} |
| OS | macOS Version 10.15.7 (Build 19H2) |
Wallet: 0x8ac08A6a9428C2D0DCE0950406754699E81B45a0
i think Twitter uses a service worker to show those UI components so they work offline. see brave://inspect/#service-workers
maybe service worker isn't cleared when all data is cleared? cc @fmarier
i just tested it and clearing cache in brave://settings/clearBrowserData deleted the twitter service worker after a slight delay as long as the twitter tab was closed currently
If you aren't interacting with the SW, it's never deleted, it seems. It sticks for at least 24h after all browsing data is cleared. But if you open/close (reload) twitter.com, it will be deleted.
@diracdeltas what do you thnk a good priority is here? P3?
p3 sgtm
eggcellent, p3 it is. Thanks @diracdeltas !
Hello,
I am also experiencing this issue with Brave. Despite having configured the settings to clear browsing history and data on exit, my tabs reappear every time I restart the browser.
Problem Details
- I had tabs open with a ChatGPT session and another with Brave settings.
- I checked all the options to clear history and browsing data on exit, and saved.
- Upon closing and reopening Brave, my tabs consistently reappear.
Observations
- I noticed that despite the clear data options being enabled, the
Sessionsfolder andHistoryfile (located at~/snap/brave/current/.config/BraveSoftware/Brave-Browser/Default/) are not emptied after closing Brave.
Environment
- Operating System: Ubuntu 24.04 LTS
- Brave Version: Version 1.67.119 Chromium: 126.0.6478.114 (Official Build) (64-bit)
I am a novice and hope that adding this comment as a report is appropriate and timely.
I am also experiencing this issue with Brave. Despite having configured the settings to clear browsing history and data on exit, my tabs reappear every time I restart the browser.
If you go into settings (brave://settings/getStarted), do you have the Continue where you left off setting selected?
Yes, it was this option. After that, always with the settings of clearing history and data, I also tried setting the option "open the New Tab page", I closed Brave, and I checked my Brave configuration directories. It turns out that the session folder and the history file were not empty.
@Bob563-sudo Just to make sure I understand correctly: when you set the option to "Open the New Tab page", your tabs are gone, but you still see a session folder and a history file?
Yes, exactly.