HTML5 uses local storage to store data locally.

Source: Internet
Author: User
Tags sqlite manager

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:

<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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.