1) different storage space .
A) The WEB storage can provide 5MB of storage space (different browsers provide different space). Cookies are only 4KB.
b) Web storage each domain (including subdomains) has a separate storage space, each storage space is completely independent, so it does not cause data confusion.
2) interacting with the server .
The data in the WEB storage is only local and does not interact with the server.
The contents of the cookie are sent along with the request (bandwidth wasted).
3) interface .
Web storage provides more rich and easy to use interface, with Setitem,getitem,removeitem,clear and other methods, operation of data more convenient.
Cookies require the front-end developer to encapsulate Setcookie,getcookie.
4) cross-domain issues .
A cookie needs to specify a scope and cannot be called across domains.
Description: Cookies are also not available or missing: The role of cookies is to interact with the server as part of the HTTP specification, and the Web storage only for local "storage" data.
The above content for their own collation, if there are errors, please correct me, thank you ~ ~
The difference between Web storage and cookies