Getting Started with JavaScript for Web Development

Storing to LocalStorage

LocalStorage allows us to save information to the browser itself. This let's us persist data for our users without having to make a trip to an actual database.

Using LocalStorage

// save to localStorage
localStorage.setItem('username', 'chris');

// get data from localStorage

Like this article? Follow @chrisoncode on Twitter