What Localstorage is and what it does

Source: Internet
Author: User

Localstorage as one of the APIs for HTML5 local storage of Web Storage features, the main purpose is to keep the data in the client, while the client generally refers to the computer of the Shanghai website design user. On mobile devices, because most browsers support Web Storage features, web browsers on smartphones, such as Android and iOS, can use this feature normally.
Localstorage saved data, in general, is permanently saved, that is, as long as the use of localstorage to save information, data is stored in the user's client. Even if the user restarts after closing the current Web browser, the data is allowed to exist. Knowing that a user or program explicitly makes a deletion, the life cycle of the data ends.

In terms of security, Localstorage is secure within the domain, that is, Localstorage is domain-based. Any page within that domain can access the Localstorage data. However, the problem is that the data between browser vendors ' browsers is independent of each other. That is, if you use Localstorage to store a set of data in Firefox, it will not be readable under the Chrome browser. Similarly, because the localstorage data is stored in the user's device, the data stored on different devices is different for the same application.


Reference:
Http://www.w3school.com.cn/html5/html_5_webstorage.asp
Http://www.cnblogs.com/yexiaochai/p/4509472.html

What Localstorage is and what it does

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.