Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is HTML5 WebStorage data physically stored?

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.

like image 931
Joe Alfano Avatar asked Mar 12 '12 14:03

Joe Alfano


People also ask

How is data stored in HTML5 storage?

What is HTML Web Storage? With web storage, web applications can store data locally within the user's browser. Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance.

Does HTML5 have local storage?

HTML5 introduces the localStorage attribute which would be used to access a page's local storage area without no time limit and this local storage will be available whenever you would use that page.

What are the two types of HTML5 web storage?

It is important to know that there are two types of Web Storage objects: sessionStorage and localStorage . sessionStorage is only available within the browser tab or window session. It's designed to store data in a single web page session. localStorage is kept even between browser sessions.

How is browser data stored?

The 3 ways to store data in the browser are Cookies, Local Storage, and Session Storage. Depending on the needs any one of them is used to store data in the browser. In today's article, we will discuss an in-depth comparison between local storage, session storage, and cookies.


1 Answers

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.

like image 187
Kyle Nunery Avatar answered Sep 19 '22 15:09

Kyle Nunery