DEV Community

Discussion on: Please Stop Using Local Storage

Collapse
 
imichael profile image
✨iMichael✨

As you have hopefully learned since publishing this post: This topic is incredibly nuanced and titles like "Stop using X" just add to the cancer that is cargo-cult thinking that infects our industry.

A more thoughtful way to educate people on this topic is frame the trade offs of all storage options. In a SPA context there are perfectly valid justifications for using localStorage and as of this date, I'm not aware that anyone has ever demonstrated a real world exploit of a site that stores tokens in localStorage (in a way that is an exclusive issue with localStorage).