JavaScript LocalStorage and Session Storage API Tutorial

Veröffentlicht am: 22 Oktober 2020
auf dem Kanal: Dave Gray
26,163
633

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

This JavaScript LocalStorage and SessionStorage tutorial demonstrates the Web Storage API. We'll compare Session Storage (sessionStorage) and Local Storage (localStorage). We'll look at why JSON works so well with web storage. You will learn how to store persistent data for users between their visits to your web app. Let's get started!

Subscribe ➜ https://bit.ly/3nGHmNn

▶ This video is part of the JavaScript Tutorials for Beginners Playlist found here:    • Javascript Tutorials for Beginners  

✅ Quick Concepts outline:
JavaScript Web Storage API
(0:00) Intro
(0:14) Web Storage is part of the global window object
(4:02) Session Storage
(4:22) Local Storage for persistent data
(4:48) setItem
(5:28) The dev tools application tab
(5:50) What type of data does web storage store?
(6:20) getItem
(7:50) Why JSON is the perfect match for web storage
(12:15) A look at localStorage for persistent data
(14:15) removeItem
(14:55) Retrieving an item that does not exist
(15:25) Clear all items
(15:55) Get the key at a specific index position
(17:10) Return how many keys are in storage

📚 Further Reading:
MDN Web Docs:
Web Storage API: https://developer.mozilla.org/en-US/d...
sessionStorage: https://developer.mozilla.org/en-US/d...
localStorage: https://developer.mozilla.org/en-US/d...

📺 More Beginner JS Videos:
freeCodeCamp:    • Learn JavaScript - Full Course for Beginners  
Traversy Media:    • JavaScript Crash Course For Beginners  
The Net Ninja:    • Modern JavaScript Tutorial #1 - Intro & Setup  

✅ Follow Me:
Twitter:   / yesdavidgray  
Reddit:   / daveoneleven  
LinkedIn:   / davidagray  

Was this tutorial about the web storage API with sessionStorage, localStorage, and persistent data helpful? If so, please share. Let me know your thoughts in the comments.

#localstorage #sessionstorage #javascript


Auf dieser Seite können Sie das Online-Video JavaScript LocalStorage and Session Storage API Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Dave Gray 22 Oktober 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 26,163 Mal angesehen und es wurde von 633 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!