localStorage is also known as web storage, HTML5 storage, and DOM storage (all of which mean the same thing).
localStorage is similar to sessionStorage, except that the data stored in localStorage does not expire, and the data stored in sessionStorage is cleared when the browsing session ends (i.e. when the browser is closed).
localStorage is available in all browsers, but persistence is not performed sequentially. In particular, localStorage can be cleared by user action and can be deleted unintentionally (who would think that clearing all cookies also clears localStorage?).
In Firefox, localStorage is cleared when these three conditions are met: (a) the user clears the recent history, (b) the selected cookies are cleared, (c) the time range is "All"
In Chrome, localStorage is cleared when these conditions are met: (a) clear browsing data, (b) “cookies and other site data” selected, (c) timeframe “from the beginning of time”. In Chrome, you can now remove localStorage for one specific site .
In IE, clear localStorage: (a) Tools - Internet Options, (b) General tab, (c) delete browsing history upon exit, (d) provide “cookies and website data” (or “temporary Internet files” and files website "), (e) consider unchecking the" Save Favorites website data at the top
In Safari: (a) Click Safari (b) Settings (c) Select the Privacy tab (d) Click Delete All Website Data (e) Click "Delete Now"
Opera Despite the excellent localStorage articles from the Opera website, I have not yet found clear (non-programmatic) instructions for users on how to clean up localStorage. If anyone finds, leave a comment below this answer with a link.
The Opera developer site has an excellent summary of localStorage:
The current way of storing data on the client side - cookies - this is the Problem:
Low size: cookies usually have a maximum size of about 4 KB, which is not very good for storing any complex data.
It is difficult for cookies to track two or more transactions on the same site, which can occur in two or more different tabs.
- Cookies
can be used using methods such as cross-site scripting, which leads to security breaches
Other (less popular) alternatives to cookies include methods that include query strings, hidden form fields, local shared objects based on flash memory, etc. Each with its own set of issues related to security, ease of use, size restrictions, etc. Thus, so far we have used rather poor ways of storing data to end users. We need the best way that web storage comes in.
Web storage
The W3C Web Storage specification was developed as the best way to store data on the client side. It has two different types of storage: session storage and local storage.
Both the session and the local storage, as a rule, can store 5 MB of data per domain, which is much more than cookies.
Resources
https://dev.opera.com/articles/web-storage/
http://www.quirksmode.org/html5/storage.html
http://www.ghacks.net/2015/02/05/how-to-clear-web-storage-in-your-browser-of-choice/
https://nakedsecurity.sophos.com/2014/11/05/how-to-clear-out-cookies-flash-cookies-and-local-storage/
http://www.opera.com/dragonfly/documentation/storage/
DOMStorage MDN article (written by John Resig)
http://ejohn.org/blog/dom-storage/