- local stroage.
- local storage is used for storing and retrieving key/value data on browser.
- local storage follows same origin policy (SOP). ie different domains cannot access each other local storage.
- data persists in local storage even if the browser tab is closed.
- local stroage is prone to xss attack.
- cookies
- http only cookies cannot be read/manipulated via scripts hence cannot be stolen via xss attack.
- session storage : similar to local storage but session storage persists data only until tab is closed.
- IndexedDB : this is found in all major browsers.