PDA

View Full Version : WebEngine set local storage path or programatically clear?



RolandHughes
2nd July 2015, 22:59
All,

I'm searching for documentation for Qt WebEngine which allows me to do one of the following:

1) set the path for html5 LocalStorage
2) gives me the name of the file/location where LocalStorage persists
3) lets me clear it with a C++ function.

Yes, I have found html file documentation for the LocalStorage.clear() function, but this is during development and stuff is getting left laying around. I just need to blast it for a clean start. Does anybody know where WebEngine local storage gets written?

Thanks,

Added after 7 minutes:

Well, I cannot find documentation, but

sudo find -iname *localstorage*

turned up the following:

./home/developer/.local/share/myapp/QtWebEngine/Default/Local Storage/file__0.localstorage
./home/developer/.local/share/myapp/QtWebEngine/Default/Local Storage/file__0.localstorage-journal

I am now continuing the tradition of posting my own answers:)

That really should be in the documentation for the attribute which enables it.

anda_skoa
3rd July 2015, 08:25
That really should be in the documentation for the attribute which enables it.

You mean document the sub path "QtWebEngine/Default/Local Storage" or that it uses the data location as the base path?

In any case, you could submit the respective improvement :)

Cheers,
_

RolandHughes
4th July 2015, 20:05
You mean document the sub path "QtWebEngine/Default/Local Storage" or that it uses the data location as the base path?

In any case, you could submit the respective improvement :)

Cheers,
_

Document the path it uses for storage and any environment variable which can set it. Under WebKit there were methods to set local storage path and name so an application could be certain to clean this up. If they hadn't used "Local Storage" in the name I wouldn't have been able to find it.