00:00
00:00
Newgrounds Background Image Theme

RobotHeadProductions just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

HTML5/Js game setting cookie

96 Views | 2 Replies
New Topic Respond to this Topic

HTML5/Js game setting cookie 2021-01-20 04:14:30


Hi!


Question:

is it possible to set cookies somehow in a HTML5/js game on Newgrounds? Or, maybe some other way of saving state locally on the users machine or connected to the users Newgrounds account?

I can't seem to find any info about this in the dev resources, and the new API doesn't support save data yet it seems.


Background:

I have a HTML5/js game and I'm trying to set a cookie to locally save the players personal high scores. I'm also using a cookie to assign a UID so that I can get some stats on returning players (this is sent to my server). This would work even if the player is not logged in. It's all totally anonymous. However, setting cookies doesn't seem to work on Newgrounds.


Thanks!

Response to HTML5/Js game setting cookie 2021-01-20 11:30:39


This question is probably best asked to the people in the Game Development forum - https://www.newgrounds.com/bbs/forum/2

Response to HTML5/Js game setting cookie 2021-01-20 16:08:27


At 1/20/21 11:30 AM, Little-Seven-Seize wrote: This question is probably best asked to the people in the Game Development forum - https://www.newgrounds.com/bbs/forum/2


Thanks for the tip, I'll try that.