LocalStorage API explained in under 5 minutes — Being web developers we all have been into a situation, where we want to persist a piece of information like user data, theme preference, or the selected filters, to give our users a consistent experience across browser sessions. Well, that’s exactly where the LocalStorage API comes into the picture.