How and where are the data stored in localStorage?



  • I understand that localStorage is just a global Window facility, so I'm interested in the data storage facility itself, as is the case and where the data are stored: in a file or some local database? And where can they be found by blowing the browser's console?



  • My free translation of the answer: https://stackoverflow.com/a/27612275/4827341


    Firefox

    firefox keeps localstorage in the file. webappsstore.sqlite in the current profile catalogue.

    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 keeps in several files inside the catalogue. Local Storage

    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/
    

    usually:

    ~/Library/Application Support/Google/Chrome/Default/Local Storage/
    

    Internet explorer:

    I'm not very sure, but I think it's like,

    %userprofile%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStorage
    

    Opera

    According to OammieR:

    C:\Users\Administrator\AppData\Roaming\Opera\Opera\sessions\autosave.win
    

    or according to Kevin Hakanson:

    C:\Users\Administrator\AppData\Local\Opera\Opera\pstorage\
    

    Sources

    • https://stackoverflow.com/questions/7079075/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




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2