Home > Web Front-end > H5 Tutorial > body text

Recommended articles about localStorage and sessionStorage

零下一度
Release: 2017-06-12 09:17:07
Original
1931 people have browsed it

1. Overview localStorage and sessionStorage are collectively called Web Storage, which allows web pages to store data on the browser side. The data saved by sessionStorage is used for a browser session. When the session ends (usually the window is closed), the data is cleared; the data saved by localStorage exists for a long time. The next time you visit the website, the web page can directly read the previously saved data. data. Except for the different storage periods, the properties and methods of the two objects are exactly the same. They are much like an enhanced version of the cookie mechanism and can use much larger storage space. Currently, the storage limit per domain depends on the browser, and is 2.5MB for Chrome, 5MB for Firefox and Opera, and 10MB for IE. Among them, Firefox's storage space is determined by the first-level domain name, while other browsers do not have this limitation. That is, in Firefox, a.example.com and b.example share 5MB of storage space. In addition, like cookies, they are also subject to same domain restrictions. The data stored in a web page is only

1. Specific analysis of localStorage and sessionStorage of HTML5 local storage

Recommended articles about localStorage and sessionStorage

Introduction: The data saved by sessionStorage is used for a session of the browser. When the session ends (usually the window is closed), the data is cleared; the data saved by localStorage exists for a long time. When visiting the website once, the web page can directly read the previously saved data. Except for the different storage periods, the properties and methods of the two objects are exactly the same.

2. Talk about the pros and cons of local storage Cookie, localStorage, sessionStorage_html/css_WEB-ITnose

Introduction: Talk about Local storage pros and cons Cookie, localStorage, sessionStorage

3. HTML5 local storage localStorage, sessionStorage basic usage, traversal operation, exception handling, etc. _html5 tutorial skills

Introduction: This article mainly introduces the basic usage of HTML5 local storage localStorage, sessionStorage, traversal operations, exception handling, etc. Friends in need can refer to it

[Related Q&A Recommendations]:

Why do localStorage and sessionStorage belong to the category of html5, but why do IE8 support them?

The above is the detailed content of Recommended articles about localStorage and sessionStorage. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!