Getting Started with JavaScript for Web Development: Lesson 20 of 23

Storing to LocalStorage

Up Next

Deleting Bookmarks

Autoplaying in 7 seconds!



Table of Contents

    a href="">

    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

    Chris Sevilleja

    173 posts

    Founder of Google Developer Expert in Web Technologies. Slapping the keyboard until something good happens.