Where are sessionStorage and localStorage stored on the client's computer?
Could you tell me the path?
-
2It's probably browser specific. – Madara's Ghost Dec 26 '11 at 08:23
-
1@MadaraUchiha browser+OS specific! – peteorpeter Nov 26 '13 at 16:37
4 Answers
Firefox
Firefox stores localstorage in webappsstore.sqlite
file in the profile folder.
Firefox (Windows XP):
C:\Documents and Settings\<Windows login/user name>\Application Data\Mozilla\Firefox\Profiles\<profile folder>\webappsstore.sqlite
Firefox (Windows Vista and above):
C:\Users\<Windows login/user name>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile folder>\webappsstore.sqlite
or:
%APPDATA%\Mozilla\Firefox\Profiles\<profile folder>\webappsstore.sqlite
Firefox on linux:
~/.mozilla/firefox/<profile folder>/webappsstore.sqlite
Firefox on mac:
~/Library/Application Support/Firefox/Profiles/<profile folder>/webappsstore.sqlite
or:
~/Library/Mozilla/Firefox/Profiles/<profile folder>/webappsstore.sqlite
Chrome
Chrome stores in separate files inside the Local Storage
directory.
Chrome on windows:
%LocalAppData%\Google\Chrome\User Data\Default\Local Storage\
Chrome on linux:
~/.config/google-chrome/Default/Local Storage/
Chrome on mac:
~/Library/Application Support/Google/Chrome/<Profile>/Local Storage/
commonly:
~/Library/Application Support/Google/Chrome/Default/Local Storage/
Internet explorer:
I am a bit unsure, but think this will do the trick
%userprofile%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStorage
Opera
As said by OammieR:
C:\Users\Administrator\AppData\Roaming\Opera\Opera\sessions\autosave.win
or as said by Kevin Hakanson:
C:\Users\Administrator\AppData\Local\Opera\Opera\pstorage\
Sources
https://superuser.com/questions/507536/where-does-google-chrome-save-localstorage-from-extensions
My own computer ubuntu 14.10 with Firefox and Chrome

- 1
- 1

- 2,187
- 1
- 19
- 27
-
-
-
5This is only about `localStorage` right? How about `sessionStorage` mentioned by OP? – Franklin Yu Mar 26 '18 at 15:08
-
1@FranklinYu have a look here: https://stackoverflow.com/questions/7576211/where-does-firefox-store-the-sessionstorage-content#comment92161739_7581138 – baptx Oct 05 '18 at 09:32
-
In my environments the path of the Local Storage for IE 11 Windows 10: %UserProfile%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStore; Windows Server 2019: %LocalAppData%\Microsoft\Internet Explorer\DOMStore The path is stored in the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\LowCache\Extensible Cache\DOMStore\CachePath – pholpar Sep 22 '20 at 09:15
-
Please 1 question, if I saved a local storage key and value to track the user for example user X i store key visit , and value his IP for example , if new user visit my website when I check the key I will not find the visit key is that true, what I mean can I use this way to detect each new user visit my website check the visit key and if not so he is new user? thanks – Mahmoud Magdy Mar 02 '21 at 18:02
The data for Opera (version 12.14 on Windows 7) was located under
C:\Users\Administrator\AppData\Local\Opera\Opera\pstorage\
A psindex.dat
contained the index to the actual data files. I visited TodoMVC and the quirksmode HTML5 Test - storage to get data saved.
<?xml version="1.0" encoding="utf-8"?>
<preferences>
<section id="BA27342AD231CFCE350305FA85EB6ED1D2C57ABC">
<value id="Type" xml:space="preserve">localstorage</value>
<value id="Origin" xml:space="preserve">http://todomvc.com</value>
<value id="DataFile" xml:space="preserve">pstorage\00\07\00000000</value>
</section>
<section id="DAA00EFF4F10589343DE5A9AD5C47BD8F28FFFD4">
<value id="Type" xml:space="preserve">localstorage</value>
<value id="Origin" xml:space="preserve">http://www.quirksmode.org</value>
<value id="DataFile" xml:space="preserve">pstorage\00\0F\00000000</value>
</section>
</preferences>
The quirksmode test page let you interactively use the localstorage APIs, so I effectively executed the following code:
localStorage.setItem('Name','Value');
For Firefox see Where does firefox store javascript/HTML localStorage? and for Chrome see How is HTML5 WebStorage data physically stored?.
Opera seems to base64 encode the JavaScript unicode strings in the pstorage\00\0F\00000000
file.
<ws>
<e><k>TgBhAG0AZQA=</k>
<v>VgBhAGwAdQBlAA==</v></e>
</ws>
Below are the Base64 values above, also encoded as hex and as a string (where \0
represents String.fromCharCode(0)
).
Base64: TgBhAG0AZQA=
Hex: 4E0061006D006500
String: N\0a\0m\0e
Base64: VgBhAGwAdQBlAA==
Hex: 560061006C0075006500
String: V\0a\0l\0u\0e\0

- 1
- 1

- 41,386
- 23
- 126
- 155
LcalStorage and Session storage are stored as per the browser specific paths (like we have for Cookies)....Also it is kind of limited to the Sandboxed environment of the application. So, only the domain which sets them can read or access it.
Again also remember that only the user has control over expiry of these storage.

- 700,868
- 160
- 1,392
- 1,356

- 49,230
- 102
- 290
- 442
I found this (Opera)
C:\Users\Administrator\AppData\Roaming\Opera\Opera\sessions\autosave.win
and another from