I thought this video by Beau at Free Code Camp was awesome.
I pulled this table out from the video for comparing between
Comparing Cookies, localStorage, and sessionStorage
|Cookies||Local Storage||Session Storage|
|Accessible from||Any window||Any window||Same tab|
|Expires||Manually set||Never||On tab close|
|Storage Location||Browser and server||Browser only||Browser only|
|Sent with requests||Yes||No||No|
localStorageshould only be used for persisting non-sensitive data between pages since they can be read and modified from the client
Cookiesinformation can be intercepted in transit if not on HTTPS
Cookiesshould use the
Cookiesshould not be used to store large amounts of information since all
cookiesvalid for a page are sent for every request to the same domain.