Im just curious on how I can use WebStorage in a game ? Is this going to remember the user IP or something and resume the game where he left it ?
The web storage only stores the values you put in to it - it doesn't store the game state automatically. You can make a save game by storing all the necessary information in WebStorage though. A really simple way would be to store the current level, for example. Then you can restore them to the last level rather than having to save every single object's position, angle etc.
WebStorage stores the data in the browser on the user's computer. So as long as you're using the same browser and visiting the same web page, the values are remembered.
Develop games in your browser. Powerful, performant & highly capable.
Good thank you :)
I assume it works if we run a game in a browser on iPhone ?
Yep, I believe mobile browsers support WebStorage too. Haven't got a mobile to hand, maybe throw up a quick test to check?
I have an iPod Touch 4, is ready to do a quick test
If someone deletes the cookies, can lose the saved game?
It'll only clear if they clear the cache, not the cookies.