why does my flash cookie get deleted when i upload a new version of a game?

5 posts

Flag Post

can any cookie experts help with this one?

i use a cookie (local shared object) in my game to keep track of the players progress and which locked features they’ve unlocked, etc. but when i upload a new version of the game i’ve noticed that the cookie seems to get deleted.

i’m not changing anything about the cookie itself, just other unrelated stuff in the game. i’ve never seen the effect happen anywhere else, just on kongregate. i thought the cookie was linked somehow to the URL, and it persisted there until the user rightclicked and reset the local storage to zero.

I’m not even sure if it affects other players who’ve previously played the game and set the cookie, or just me as the developer. anyone else noticed this effect and know away round it? i’m worried i’ve reset the progress for my (two) regular players…

cheers all


Flag Post

The cookie is indeed linked to the URL. As far as I know, the URL changes when you upload a new version, ergo the flash cookie location changes. Store your cookie on a higher level that’s not dependent on the URL if you dont want that to happen.

Flag Post

ok, that makes sense. but i didn’t know i even got the option to put the cookie elsewhere.
i use this line to set the cookie:

theMan = SharedObject.getLocal(“JBistheMan”);

how would i change that to place it somewhere safe?

Flag Post

The getLocal() method accepts a second parameter that affects the path.


Flag Post

ok nice, i’ll give that a go next time. thanks very much AC, much appreciated.