JavaScript LocalStorage and Session Storage API Tutorial
Dave Gray
@davegrayteachescodeAbout
Web Development tutorials with full courses on HTML, CSS, JavaScript, React, Node.js and more! My goal is to help you learn how to build the web. Teaching helps me learn, too. I work full-time as a Solutions Architect / Developer and part-time as a university web dev instructor. Thank you for subscribing, supporting my channel and sharing the videos you think may help others. Keep striving for progress over perfection. And a little progress every day goes a very long way. Milestones: July 20, 2020 - 1st video Jan 1, 2021 - 1k subs April 2021 - 4k watch hours Nov 2021 - 10k subs Jan 21, 2022 - Video at 100k views Feb 16, 2022 - 100k watch hours Feb 19, 2022 - 1m views Dec 13, 2022 - 100k subs Dec 2022 - Over 1m views in 1 month April 7, 2023 - 10m views May 26, 2023 - 1m watch hours Sept 22, 2023 - Video at 1m views Dec 25, 2023 - 250k subs
Latest Posts
Video Description
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: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6Oi6xNtL_fwCrwpuqylMsgT ✅ 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/docs/Web/API/Web_Storage_API sessionStorage: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage localStorage: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage 📺 More Beginner JS Videos: freeCodeCamp: https://youtu.be/PkZNo7MFNFg Traversy Media: https://youtu.be/hdI2bqOjy3c The Net Ninja: https://youtu.be/iWOYAxlnaww ✅ Follow Me: Twitter: https://twitter.com/yesdavidgray Reddit: https://www.reddit.com/user/DaveOnEleven LinkedIn: https://www.linkedin.com/in/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
Upgrade Your Garden Today
AI-recommended products based on this video

44 Pods Hydroponics Growing System, DRYADES Dual Layers Indoor Garden with LED Full Spectrum Grow Light, 2 × 13.3L Water Tanks, Height & Angle Adjustable, Professional Smart Plant Germination Kits

supernal 100pcs Gold and Black Plastic Cups 10oz Gold Rimmed Elegant Black Party Plastic Cups Heavy Duty Fancy Wedding Drinking Tumblers for Parties,Birthday,Graduation Decorations 2025 Deals

Dog Car Seat Cover,100% Waterproof Scratch Proof Nonslip Seat Cover,600D Heavy Duty Scratch Durable Soft with Side Cover Dog Hammock for Cars Trucks and SUVs

MSI MAG MT201D - Premium Heavy Duty Dual Monitor Stand Arms, 17-45" Support, VESA Compatible, Adjustable Spring Mount, 44 lbs per Screen, Clamp & Grommet, Quick Release Plate - Black

EcoNour Windshield Cover for Ice and Snow | Heavy Duty 600D Oxford Fabric | Windshield Protector for Cars, SUVs, Trucks | Secure Fit Waterproof Frost Cover | Winter Car Accessories | Medium (69"x42")




















