I. Similarities and differences between Cookie and session

Method to get cookies

The emergence of WebStorage

The purpose of WebStorage is to overcome some of the limitations imposed by cookies. When data needs to be tightly controlled on the client, it does not need to continuously send data back to the server. WebStorage has two main goals :(1) to provide a path to store session data in addition to cookies. (2) Provide a mechanism for storing large amounts of data that can exist across sessions. HTML5 WebStorage provides two apis: localStorage (localStorage) and sessionStorage (sessionStorage).

Similarities and differences between LocalStorage and SessionStorage

Superior to cookie