The LocalStorage object stores data without expiry date in browser. The stored data will not be deleted when the browser is closed, and will always be available the next visit onwards. To delete the data, it needs to be cleared or removed manually. Below are few tasks which can be performed using LocalStorage:
localStorage.setItem('seen', true); // Set Item
localStorage.getItem('seen') // Get Item // returns true
localStorage.removeItem('seen') // Remove Item
localStorage.clear(); // Clear all items
Check Here for Browser Compatibility.