Local & Session Storage :

LocalStorage Object SessionStorage Object
1. It stores the data without an expiry date. 1. Stores the data for only one session.
2. The data can be shared between multiple windows of the browser. 2. Data is accessible only in the current window of the browser.
3. Data is not deleted when the browser window closes. 3. The data is deleted if the browser window closes.