TLDR Web Dev · ARTICLES & TUTORIALS
USING LOCALSTORAGE IN MODERN APPLICATIONS
Summary from the TLDR Web Dev newsletter
localStorage has been supported in most browsers for over fifteen years, so it’s a reliable way to persist key-value pairs on the client side. This article explores the various aspects of the localStorage API, its advantages and limitations, and alternative storage options available for modern applications. localStorage is best used for user preferences, simple settings, or temporary data. It should not be used for large datasets, querying data, or frequent read/writes as there’s JSON overhead and it’s not asynchronous.