Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where the sessionStorage and localStorage stored?

Where are sessionStorage and localStorage stored on the client's computer?
Could you tell me the path?

like image 817
OammieR Avatar asked Dec 26 '11 08:12

OammieR


People also ask

Where is sessionStorage stored?

The sessionStorage exists only within the current browser tab. Another tab with the same page will have a different storage. But it is shared between iframes in the same tab (assuming they come from the same origin).

Where does localStorage get stored?

Where is localStorage stored? Firefox saves storage objects in an SQLite file called webappsstore. sqlite , which is also located in the user's profile folder.

Are sessions stored locally?

sessionStorage is similar to localStorage ; the difference is that while data in localStorage doesn't expire, data in sessionStorage is cleared when the page session ends. Whenever a document is loaded in a particular tab in the browser, a unique page session gets created and assigned to that particular tab.

Is sessionStorage sent to server?

Sending the data to server is fully possible. Everything stored in Storage (session and local) is stored as a string.


2 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

  • Where does Firefox store javascript/HTML localStorage?

  • https://superuser.com/questions/507536/where-does-google-chrome-save-localstorage-from-extensions

  • http://www.chromium.org/user-experience/user-data-directory

  • My own computer ubuntu 14.10 with Firefox and Chrome

like image 141
NatureShade Avatar answered Oct 18 '22 11:10

NatureShade


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.

like image 44
copenndthagen Avatar answered Oct 18 '22 10:10

copenndthagen