Difference between Session Storage and Local Storage in HTML5


Session Storage

The Session Storage is designed for scenarios where the user is carrying out a single transaction but could be carrying out multiple transactions in different windows at the same time.

Local Storage

The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.

HTML5 introduces the localStorage attribute which would be used to access a page's local storage area without no time limit and this local storage will be available whenever you would use that page.

Updated on: 30-Jul-2019

592 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements