+ 5
Ok, so lets say I want to use cookies to save my game stats?
Is this feasible in JS? or would I be better off trying to reference to a database and save the info server side? Here's the game I want to save stats from. https://code.sololearn.com/WaqGLukwdd5x/?ref=app
10 ответов
+ 5
https://www.w3schools.com/js/js_cookies.asp
+ 4
oddly enough, cookies seem to work on the website playground, but not the mobile playground... same with localStorage. Seems a database will be the best concept...
+ 4
Thanks, I'll check it out.
I have a site at 000webhost.com, I had a PHP forum on the same host before, not sure if it can do nodejs tho
+ 3
Good insights
+ 3
that's because the app's webview component doesn't have same permissions/capabilities the browser has. Smae goes if you want to access cameras/microphone/geolocation/vibration etc...
+ 3
Hmm. Well I'm studying Node.js, gonna see if that will have a workaround so it will be compatible on mobile. Seems promising
+ 3
seems to do the job... time to read up
+ 2
I think it's doable but, what if the user clears cookies? What if the user switches between mobile and desktop browsers?
If these issues are fine for you, why not?
+ 2
Sorry, it was "scoreboard" here's Burey's tutorial.
https://code.sololearn.com/Wb3UALD0atIG/?ref=app
+ 1
heroku has some free options if you want to deploy your nodejs server. Expect limitations but for testing and simple user checkpoints should be good enough.
Check out Burey's leaderboard if you want to go with firebase db