Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Not Getting Cookies from SaveSharedVariable Command for HTML5 Game

Author
Message
JosephB
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 4th May 2020 21:20 Edited at: 5th May 2020 00:40
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:

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.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-22 04:20:15
Your offset time is: 2024-11-22 04:20:15