1 HTML5 Storage is mainly divided into two types: localStorage and sessionStorage. The two are mainly different in the life cycle. localStorage has a long life cycle, in principle, it will not disappear until the content is cleared through Javascript or the user clears the Cache. sessionStorage is cleared when Browser/Tab is disabled.
2 cookies
2.1.Cookie is sent to the Server when each HTTP request is sent. No matter you do not need the information in the Cookie, the execution efficiency and unnecessary network bandwidth will be wasted to some extent.
2.2.the data sent by cookies is not encrypted. Therefore, no important information should be put in cookies unless we use SSL-based technologies.
2.3.Cookies can only be 4 kB at most and cannot store too much data
Refer:
Http://www.e800.com.cn/articles/2011/0503/484985.shtml
Http://www.cnblogs.com/yuzhongwusan/archive/2011/12/19/2293347.html
SessionStorage, localStorage, cookies