How does html5 use local storage to store data locally? (I am using chrome, And the chrom browser uses sqlite to save local data)
Html5 local storage stores data locally through a browser.
The basic usage is as follows:
[Javascript]
<Script type = "text/javascript">
LocalStorage. firstName = "Tom ";
Alert (localStorage. firstName );
</Script>
In this way, the data is saved locally, but in what form is the local data saved? After tracking, we found that in Chrome, data is stored as sqlite database files.
In windows, it is saved in C: \ Documents and Settings \ User Name \ Local Settings \ Application Data \ Google \ Chrome \ User Data \ Default \ Local Storage path (where User Name refers to the current User Name;
In Mac, it is stored in the/Users/User Name/Library/Application Support/Google/Chrome/Default/Local Storage path (where User Name refers to the current User Name ).
Although the suffix is. localstorege, it is actually a database file of sqlite. You can open it with sqlite and see the data in it. (You can use the SQLite Manager additional component of firefox to open it)
The steps for installing components are similar to those for installing firebug. Select the menu tool --> attachment component, open the attachment component settings page, search for the keyword "SQLite Manager", install the "SQLite Manager" plug-in, and restart firefox, you can see the "SQLite Manager" additional component in the tool, as shown in:
View the saved local data file
Author: yhawaii