+ 5
How to make web page store data from user?
I've been experiencing with making little fun projects using HTML, CSS and JS. But everything loads back from the beginning each time the page reopens. Changes in the DOM caused by JS are also reversed. So how can I write a page where user can start from where they left off like a game that saves player data?
9 odpowiedzi
+ 2
For private game data, I suggest you to use local storage.
No reason to use server database for a such thing
+ 2
Thanks Sham XR but does it have to work from a server? How about one that would be stored on user's device? If locally storing data is possible what language can help me achieve this?
+ 2
use cookies in javascript
+ 1
you need a database to do such a things, in terms of game development if you go deep inside it you will find many built in functions doing these things for you.
+ 1
otherwise you Need a database to store all variables when the session closes, and load it again when we come back.
+ 1
As mentioned before, you need a backend (database).
Alternatively you can store the data in the browser (localStorage). When the user visits the site again, the data can be accessed from localStorage.
+ 1
with the support of database we can store users info in a secure manner
in java : JDBC and HIBERNATE
in .Net : ADO.NET
in PHP : several predefined functions
in Python : there are modules
ex pymysql
+ 1
Im wondering just what is the real purpose of cookies ? and are they only utilized in javascript or all the language
+ 1
Use firebase local data base with xamapp intialize firebase it give you a local database using your Sql skill you can use it