An HTML5 cookie generally serves a similar functionality as that of a standard website cookies, but it's much faster and more secure. It was designed to eliminate the security issues that come with a traditional cookie. An HTML5 cookie stores the data directly on the browser in two distinct forms:
Session storage saves the data until the session expiry
Local storage is persistent storage
This system enables confidential transactions to be securely removed, offline access of applications, less header data in communication with the primary website and larger capacity than traditional cookie storage.