How to Use Local Storage in JavaScript

dcode
dcode
282.5 هزار بار بازدید - 6 سال پیش - By using Local Storage in
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
6 سال پیش در تاریخ 1396/11/29 منتشر شده است.
282,547 بـار بازدید شده
... بیشتر