However, it appears that a user can play for an extended period, discovering the puzzle solution, then reload the page and enter fast and accurate answers, thereby posting a good score.
Is there a way to circumvent this?
Hi,
We can use cookies for that. When the user already finished playing, you can set a cookie value in user's web browser. Check that cookie value at the page load so you can know if it's a first time user or a user who has already played the game. By setting
the cookie expiration, you can allow users to play the game again, once s/he forgets the puzzle solution :)
If you would like user to play ONLY a one time, then it's better to keep a flag value in the database and check that value when user tries to play the game.
Ruchira
All-Star
42885 Points
7019 Posts
MVP
Re: How to reject a refresh?
May 03, 2012 05:53 PM|LINK
Hi,
We can use cookies for that. When the user already finished playing, you can set a cookie value in user's web browser. Check that cookie value at the page load so you can know if it's a first time user or a user who has already played the game. By setting the cookie expiration, you can allow users to play the game again, once s/he forgets the puzzle solution :)
If you would like user to play ONLY a one time, then it's better to keep a flag value in the database and check that value when user tries to play the game.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.