Reputation: 316
Since Chrome 61 it appears that any item added to the local stage no longer gets created as a phsyical file within the local profile.
Previously running the command
localStorage.setItem('key', 'value')
Would create a SQLite file corresponding to the website in...
%localappdata%\google\chrome\user data\default\local storage\
But this now no longer seems to be the case, new items are simply no longer created in this location.
Anyone have any ideas if this behaviour has been deprecated?
Or alternatively any idea how to add to the local storage in chrome so that a physical file gets created?
Upvotes: 3
Views: 2505
Reputation: 15819
I struggled to find this file too, as Google engineers keep rewriting their own specs and changing the design every other year. :(
As of 2022, the browsers each use different systems for storing window.localStorage
and window.sessionStorage
data, much like they do JavaScript, CSS and HTML5. The Chrome browsers abandoned SQLite years ago and are using some new "LevelDB API" framework for accessing and storing this data in a shared resource database set of files the API controls and encrypts. I am assuming that is for security and speed reasons, mainly. I found this data being stored in a series of *.ldb files and other proprietary formats below for Windows users in the following folder location, which you cannot really access but at least see its being updated:
\Users\{your name}\AppData\Local\Google\Chrome\User Data\{optional profile}\Local Storage\leveldb\
Upvotes: 0
Reputation: 177574
Looks like it's now stored in a LevelDB database. See https://crbug.com/586194, Chrome Service Model, and LocalStorage using Chrome Service Model if you want to learn more.
Upvotes: 5