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 trial

JavaScript

Is there a way to have the webpage saved so we can have the page loaded as it was before refreshing it?

I think I heared Guil metioning something about this, but I couldn't find it anymore.

kevin curtis
kevin curtis
15,287 Points

We need a bit more information in order to help you out Ewerton. Couple of things you could be looking for here. Service workers will store info about the page state. You could also use the browser caching Api.

Guil used a RSVP website to teach the lessons. Imagine I submit some forms and have 4 guests to the invitee list. If I refresh the page, all these guests wont appear anymore. I want to know if there is a away to have the information saved, meaning that the guests would still apear when the page was refreshed.

I'm not sure if I'm being totally clear again. English is not my first language =/

The lessons I'm referring to are in this course https://teamtreehouse.com/library/javascript-and-the-dom-2

1 Answer

kevin curtis
kevin curtis
15,287 Points

I don't remember it being mentioned in that course, but I would personally use local storage to persist the data. You can have a look here: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage