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:
[ Ссылка ]
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
How to Use Local Storage in JavaScript
Теги
codecodingprogrammingtutorialintroductionbeginnerwalkthroughguidesoftwaredevelopmentsimpleeasyintoenglishwithexampledemowebapplicationsappwebsitehtmlhtml5javascriptjsecmascriptes5es6es7newfeaturesecmascript2015non-volatilevolatiledatastoragestorekeyvaluepairpairsbrowserchromephpdatabaseobjectwindowpersistentpermanenthowtoinsertretrievekeyswindow.localStoragesessionStoragesession