I have a simple code breaker type browser HTML5 game that is supposed to save the players' best time/score for breaking the code for each of the three difficulties as cookies using the SaveSharedVariable command. The code I use is as follows:
For entry = 0 to 2
SaveSharedVariable( passcode+"bestenergy"+Str(entry), str(bestenergy[entry]) )
energyg = energyg + bestenergy[entry]
Next entry
The cookies are saved when I test using Web Server for Chrome playing the game locally. However, when I test from my hosted web site, the cookies are not saved. The attached image shows the cookies from the local test. Is there something I must do differently with the code when playing from a website? I use WordPress to create the site. I have also tested on itch.io in draft mode and the cookies seem to go somewhere as when I close the browser and then return later, the game has kept the high score. I have not located where the cookies are kept as I cannot locate them in my personal itch.io page or the itch.io page when I search for cookies.
Edit: Performed a little more research using the Edge Dev Tools and found that the itch.io site was leaving cookies at http://v6p9d9t4.ssl.hwcdn.net/ . The error note by the dev tool was as follows:
A cookie associated with a cross-site resource at http://v6p9d9t4.ssl.hwcdn.net/ was set without the `SameSite` attribute. A future release of Microsoft Edge will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
So maybe the sharevariable commands need some change to work properly?
Thanks for any insight/help.