DEV Community

talent
talent

Posted on

Local Storage and Session Storage explained

Difference between Local Storage and Session Storage, explained:

Local Storage: Local storage is a method that allows us to store key-value pair data in the user's browser. It is stored indefinitely in the browser and has a limit of 10MB.

Session Storage: Session storage is similar to Local storage, but the data is only stored as long as the user's session is active and can store data of up to 5MB. It is terminated as soon as the user closes the browser window.

Top comments (2)

Collapse
 
babib profile image
๐๐š๐›๐ข โœจ

Thanks! Short and simple

Collapse
 
juan_patrnguerrero_702b profile image
Juan Patrรณn Guerrero

Could you explain what kind of data save in local storage and session storage ?