Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's relatively straightforward. You open the console, type window.localStorage, and poke around. On the article I see:

    > window.localStorage
    Storage {dark-mode-toggle: 'light', cid: '2722...', length: 2}
Ignore the "length" (implementation detail) and you can see it's storing whether I've turned on dark mode and some id that's likely per-user. If I switch the page to dark mode I see instead:

    > window.localStorage
    Storage {dark-mode-toggle: 'dark', cid: '2722...', length: 2}


You could also just use the Storage tab in the devtools of your browser of choice, Chrome and Firefox at least both provide a GUI for looking at storage. Not sure what all Chrome's shows, but Firefox's shows Cache Storage, Cookies, IndexedDB, LocalStorage, and SessionStorage.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: