Reputation: 107
I feel like this is a complicated topic, I searched everywhere and can't seem to find a good method to save data from users. I'm making an incremental and want people to be able to leave their browsers and have their data saved when they come back. Anyone have any suggestions?
Upvotes: 0
Views: 210
Reputation: 88
You may want to look into HTML5 Web Storage. The localStorage object can be used to store data (strings) in the user's browser (not server-side). HTML5 Web Storage is widely supported in modern browsers. If you need the data server-side as well, cookies may be a good choice for small amounts of data. If you have large amounts of structured data and wide browser support is not crucial, you should check out HTML5 IndexedDB.
Upvotes: 0
Reputation: 40084
It's pretty easy though I guess it might depend on your app. Easiest way is through using HTML5 localStorage which is built in permanent storage for modern browsers that can be manipulated easily with javascript. A good article here. If you are concerned about browsers that don't support localStorage then you can use one of the libraries that offers cookie fallback such as jStorage which happens to have a form example.
Upvotes: 1
Reputation: 2904
It sounds like you're going to need an SQL database. I'd recommend learning SQL, and learning a server-side programming language like PHP or ASP to automatically access the database. There is a lot to cover. I learned originally using w3schools, and have supplemented my education since then. w3schools an okay (not good, just okay) reference, but I wouldn't really recommend learning entirely from it. I'd recommend learning from youtube tutorials to get demonstrations and reading the manual for your server-side language.
Upvotes: 0