3 ms·
> what the heck is so important that folks need to cookie that can't be just tied to the session token in the backend? Storing information on the client makes
by jefftk 4y ago
> what the heck is so important that folks need to cookie that can't be just tied to the session token in the backend?
Storing information on the client makes your site a lot more transparent about what it's keeping. If I have various user preferences in local storage you can tell that's what I'm doing and why, but if I just cookie you with an opaque token you have no idea what I'm tracking with that on the server.
- pessimizer 4y agoIf there were a simple to examine and pick through localstorage, maybe. Of course if there were, localstorage would be intentionally obfuscated.
- jefftk 4y agoIt'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}
- easrng 4y agoYou 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.
- MereInterest 4y agoWhile this can help, it needs to be done alongside network traffic analysis. If you type your name/phone number/address into (for example) a resume template, and you see that information stored in the local client, you don't know whether that information is also stored on the server.
- jefftk 4y agoNot disagreeing! This is primarily useful for sites that are trying to make it easy for their users to determine what's happening behind the scenes.