Storage typePurposeCapacityPersistence
CookiesFor storing small data for either short term or long term and can be sent with HTTP requests to the server4KB per cookieConfigurable, can be made to expire with session or a set expiry time
Session storageTo store data that is retained only for the session5 MB per domainData is cleared when browser tab or window is closed
Local storageFor data that has to be retained even after the browser is closed, across sessions10 MB per domainAvailable until explicitly cleared by the application or user
Index DB

Refs

  1. https://dev.to/abhay1kumar/understanding-web-storage-localstorage-sessionstorage-and-cookies-1384