Session Management across Subdomains: Localstorage vs Cookies

Brief about localStorage

Use Case

Way to Solution

Cookies are pretty much a convenient way to carry information from one session on a website to another, or between sessions on related websites, without having to burden a server machine with massive amounts of data storage. If we were to store data on the server without using cookies, then it would be difficult to retrieve a particular user’s information without requiring a login on each visit to the website. Therefore, a cookie can simply be used if there is a large amount of information to store. In addition, a cookie can be made to persist for an arbitrary length of time.

Conclusion