Local Storage Newbie

I’ve written a local script (with some help from ChatGPT to be honest) allowing me to select some text on a website (let’s call it example.com) and then saving this as a value in Local Storage.

The test lines of this script show me in the console that it seems to be working perfectly, displaying all the memorized values, including the latest one. It works as well between sessions, which is exactly what I want.

As a newbie, I have 2 questions about this:

• Will these datas remain permanent? Or might they be deleted after an update, a cache cleaning or something? (I need them to be stored as safely as possible).

• Is there a way to visualize and maybe manually edit these saved values? I opened the DevTools windows, Application tab, Local Storage, https://www.example.com, but all I get is an empty table (with 2 columns Key and Value). I guess there must be a way to access the saved values somewhere, right?

Thank you for your help.

In brave://settings/clearBrowserData there are separate checkboxes for “Cookies and other site data” and “Cached images and files”. This suggests the local storage will not be cleared when the cache is deleted, but the best thing to do is to create a new profile and test it there.

When I run localStorage.setItem("myCat", "Tom"); in the console in example.com the data shows up in the devtools window.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.