9

I am trying to figure out where and how does Chrome save local storage.

I found the following folder (in my home folder) that seems to contain the local storage:

\AppData\Local\Google\Chrome\User Data\Default\Local Storage

In this folder I see files that corresponds to different URLs (the files contain URLs in their names). For each URL I see two types of files:

  1. LOCALSTORAGE file
  2. LOCALSTORAGE-JOURNAL file

I am interested in local storage of one particular web site. For this web-site the LOCALSTORAGE file contains only 6KB and the LOCALSTORAGE-JOURNAL contains nothing (0 KB).

On the other hand, when I open the web site of interest in Chrome and then press F12 I see in the local storage 6 different URL and if I click on one of them I see key-value pairs.

So, what I see in the folder and in the Chrome development tool is not consistent. Why is that? How can one find content of local storage in the directories? Or is it impossible?

2 Answers 2

17
+200

The file is in SQL Lite format. Install SQL Lite, then type the following commands:

cd %LocalAppData%\Google\Chrome\User Data\Default\Local Storage
sqlite3 *filename*
select * from ItemTable;
.quit

The ItemTable table contains key-value pairs, the semantics of which depend on the individual website.

3

see the description of localstorage file here it says : The extension LOCALSTORAGE indicates an application support file created by the web browsers using WebKit, such as Google Chrome and Apple Safari. These files store browser settings or local data for a browser extension, and enables extensions to store a local cache of user data saved in an SQLite database format.

You can browse localstorage files by a sql-lite browser, such as the open source program called sql-lite database browser

Not the answer you're looking for? Browse other questions tagged or ask your own question.