Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialtrottly
5,394 PointsSaving user inputs and changes during JavaScript session?
After learning HTML, CSS, and JavaScript, what is the next best step for learning how to save inputs and changes from the user during a session (so that it will still be available when the script runs again)? Would this be using a database or storage in the browser? I'm trying to figure out which Treehouse tracks I should learn next.
1 Answer
Peter Vann
36,427 PointsThese might help:
https://teamtreehouse.com/library/how-to-use-local-storage
https://html.com/resources/cookies-ultimate-guide/
This is a website I am working on that uses localStorage:
http://media.petervann.com/webs/moneyband/set_list.php
The site has a band setlist. The user can make an Event List and the data persists in localStorage.
From what I have tested, the Event List will persist until the user deletes it or the browser's cookies/cache is cleared, even if you close the browser and/or reboot the computer.
BTW, If you haven't done them yet, I recommend these Treehouse Tracks:
Front End Web Development
Full Stack Javascript
Learn React
I hope that helps.
Stay safe and happy coding!
trottly
5,394 Pointstrottly
5,394 PointsThanks, Peter. I will take a look into those tracks (with your website as an example).