+ 3
How to save data from html
I want to create a "website" which memories and calculate my marks How to save date from cell and you after. Example: I open HTML file in browser Enter date and Mark Exit from file (how to add auto save option) When I open again data isn't lost
3 Answers
+ 4
Depending on how much you need to be saved, the answer could be as simple as a couple cookies. However, I would personally prefer some type of database for it. Firebase is extremely simple to use, and free
+ 4
Use LocalStorage
Eg:
var x="Your String";
localStorage.userVariable=x;
During re-open
Check
window.onload=function(){
var restore;
If(localStorage && localStorage.userVariable){
restore=localStorage.userVariable;
}
}
(*userVariable - which is defined by user)
Usage of if statement:
If((Statement check the browser compatibility) && (checking the user data))