How is HTML5 WebStorage data physically stored?

Joe Alfano picture Joe Alfano · Mar 12, 2012 · Viewed 17.4k times · Source

In using the HTML5 WebStorage functionality, I know that certain browsers, like Chrome, have developer tools that enable users to browse thru the contents of their WebStorage for debugging and trouble-shooting purposes.

I was wondering if it is possible to view the contents of web storage in the file system. Is this content stored in text files on the file system that are in some standard location? Or is this data stored in some proprietary binary format by the various browsers and is not designed to be accessible or viewable by browsing the file system?

My motivation for asking this question is to see if you can view the content of WebStorage on the file system as an aid to development and debugging, and also just out of curiosity too see how this data is actually stored.

Thanks.

Answer

Kyle Nunery picture Kyle Nunery · Mar 14, 2012

Chrome uses SQLite for LocalStorage.

I confirmed this by going to AppData\Local\Google\Chrome\User Data\Default\Local Storage on my local PC and viewing the contents of a file. The files start with "SQLite format 3" when viewed via a text editor. You will need a SQLite database viewer to view the data.