Cookies are text files with small pieces of data — like a username and password — that are used to identify your computer as you use a computer network.
LocalStorage is a data storage type of web storage. This allows the JavaScript sites and apps to store and access the data without any expiration date
The sessionStorage object stores data only for a session. It means that the data stored in the sessionStorage will be deleted when the browser is closed