How to Use Local Storage in JavaScript

Published: 18 February 2018
on channel: dcode
284,426
4.7k

By using Local Storage in JavaScript, you are able to store simple data persistently for your web application directly through the web browser itself - no PHP needed!

Data is stored using key-value pairs, string-string. This makes it more than capable of storing basic data which is the intention and recommended use of Local Storage.

I wouldn't recommend using Local Storage for large scale applications because even though the data is persistent, it isn't guaranteed to stay there and is only specific on that particular machine.

In this video I show you the basics of using Local Storage as well as a mini application that prints out the data stored inside the Local Storage.

For your reference, check this out:
https://developer.mozilla.org/en-US/d...

0:00 Overview
1:30 Looking at the JavaScript
3:05 Adding data to Local Storage
4:20 Removing data from Local Storage
4:52 Getting data from Local Storage
6:28 Exploring a few extra methods
7:16 Creating the input form
14:58 Wrapping up

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript #webdev


Watch video How to Use Local Storage in JavaScript online, duration hours minute second in high quality that is uploaded to the channel dcode 18 February 2018. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 284,426 times and liked it 4.7 thousand visitors.