"LocalStorage" and "Cookies and Data - Keep Until I Close Pale Moon"

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
RealityRipple
Astronaut
Astronaut
Posts: 663
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

"LocalStorage" and "Cookies and Data - Keep Until I Close Pale Moon"

Unread post by RealityRipple » 2019-06-24, 07:16

I'm working on a site that uses LocalStorage and recently changed the layout of the data, only to discover that the storage data kept getting set back to the way it was before, even after erasing webappsstore.sqlite. After a lot of testing and disabling extensions and trying new profiles and different sites, I tracked the problem down to the custom history settings. If a site has no LocalStorage, the "Keep until: I close Pale Moon" option behaves as expected, resetting the LocalStorage to nothing after the browser closes. If, however, the LocalStorage has already been set, it still resets - back to whatever it was set to before. Essentially, instead of "don't keep", "don't save" was the implemented action, so erasures aren't saved either.

I did manage to get it to play nicely by adding the subdomain to the exceptions list (the parent domain was already in the list but didn't apply to the subdomain? maybe because it's set to first-party only?), so that's probably an easy way to test - add "s.codepen.io" to the exception list, visit https://codepen.io/gab/pen/AxFoB and set a value in the test page, restart your browser to test it works, remove the exception, and experiment with restarting and changing/unsetting the value.