Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:cleardata doesn't work? #705

Open
jjakob opened this issue Jan 22, 2022 · 3 comments
Open

:cleardata doesn't work? #705

jjakob opened this issue Jan 22, 2022 · 3 comments
Labels

Comments

@jjakob
Copy link
Contributor

jjakob commented Jan 22, 2022

Steps to reproduce

:cleardata

Expected behaviour

All browsing data should be deleted

Actual behaviour

Nothing is deleted.
Looking at files in .local/share/vimb, the files "history", "cookies.db", "command", "closed", contents of "localstorage" are unchanged.
There are also "closed", "command", "cookies.db", "history", "search" in .config/vimb, which are dated around September 2020, which aren't changed as well. Since they are identical to those in .local/share/vimb, I assume that's their old location, they got moved in some version of vimb, which left the old files laying around, requiring a manual cleanup with rm.
Also .local/share/webkitgtk, .local/share/webkitgtk-4.0, .cache/webitgtk-4.0 aren't changed or deleted other than with a manual rm. I'd assume they would all get cleaned up with .cache maybe getting completely deleted.

vimb --bug-info

vimb --bug-info
Version: 3.6.0-57-g6dbde47
WebKit compile: 2.34.3
WebKit run: 2.34.3
GTK compile: 3.24.29
GTK run: 3.24.29
libsoup compile: 2.72.0
libsoup run: 2.72.0
Extension dir: /usr/lib/vimb

.config/vimb/config:

set dark-mode=true
set home-page=https://duckduckgo.com/
set download-path=~/Downloads
set webinspector=true
set accelerated-2d-canvas=true
@jjakob jjakob changed the title :cleardata . doesn't work? :cleardata doesn't work? Jan 22, 2022
@fanglingsu
Copy link
Owner

@jjakob The :cleardata clears only those data that are stored and caches by webkit like memory-cache, disk-cache, offline-cache, session-storage, local-storage,indexeddb-databases, plugin-data, cookies and the hsts-cache. All the data sotred by vimb like last fired commands, visited websites, last searches are kept intact.

Following directories are cleared on my system:

  • .local/share/vimb/localstorage
  • .local/share/vimb/cookies.db - some entries in there are left intact - not sure why. Maybe if cookies are written by another vimb instance those are not deleted if the instance is not running.

Vimb uses https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebsiteDataManager.html#webkit-website-data-manager-clear to clear the data. There is no information that this clear only partial data. But might be related to the WebKitWebsiteDataManager which might not be shared bewteen vimb instances.

@fanglingsu fanglingsu added the bug label Jan 28, 2022
@jjakob
Copy link
Contributor Author

jjakob commented Jan 31, 2022

I also noticed a change in behavior after I manually deleted all the above mentioned files, before this none of my website logins would get remembered even if I ticked the checkbox, now they do get remembered. So maybe a file (cookies?) got corrupted and wasn't being used or cleared, now it's back to working.
After that, I tried cleardata, and it did forget my logins, so it must be doing some clearing at least.
It may be useful to other people to know that this doesn't actually delete all on-disk browsing data, if a user wants to really delete his browsing history? Or is it expected that it would delete it all, and is not behaving properly?

@fanglingsu
Copy link
Owner

@jjakob My understanding of the cleardata without any timerange is to delete everything. This is what the documentation says.

Asynchronously clear the website data of the given types modified in the past timespan . If timespan is 0, all website data will be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants