How to view localStorage stored by all domains/websites on your local machine?
Asked Answered
B

1

6

How do we view localstorage saved by all websites/domains on your local machine?

Chrome browser shows localstorage for a particular website when you visit the website. However, how do I see what got stored on my local chrome browser by all the website I visited?

Boring answered 23/2, 2022 at 0:24 Comment(2)
This is a very simple and basic question. Why, after nearly a year, doesn't it have any answers?Tidewater
I found that github.com/mdawsonuk/LevelDBDumper can dump the content of the Local Storage/leveldb directory of your Chrome profile which contains all the relevant domains (and apparently also some data, but it's unclear how exactly it's all stored there).Sheepshead
S
-1

This cannot be done1 and is by design due to security considerations.


1 The closest you could you, is you could write a robot/daemon to programmatically iterate through your history and then scrub/save your key/value local storage pairs for that history item. But this doesn't do what you asked because you could clear your history but not your local storage and then there would be nothing to iterate over. In this case, you couldn't possibly retrieve your local storage variables for all websites.

Sinuous answered 22/4 at 11:58 Comment(2)
Which security considerations would be addressed by not letting the user list all domains that made use of local storage? I understand why one wouldn't want JS code to access that information, but what is gained by not telling the user?Sheepshead
Also: some quick experimentation showed that current Chrome stores LocalStorage in the LevelDB format and using github.com/mdawsonuk/LevelDBDumper to dump the Local Storage/leveldb folder produces some data which very clearly contains the domain names that applied local storage.Sheepshead

© 2022 - 2024 — McMap. All rights reserved.