jquery - Avoid cookie editing -


i'm makin small adventure game , i'm using jquery cookie save variables (like amount of money player have) in cookies. know there tools cookie managment , editing. there way avoid editing? there way camouflage value/variable corresponding total amount of money player has?

what have is:

<style>  gold = 150;  mycookie = { totalgold: gold };  $.cookie(filename, $.param(mycookie), { expires: 9999 }); </style> 

thanks.

the answer can't, cookies meant store references session on server, can store as want on client have aware apt edited, alternative store encrypted values , translate them algorithm, way if user modifies value, won't make sense value wrong. want build js model can sync server , add end logic validate, can check out backbone.js

remember, cookies stored on users's computer hence can whatever want them


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -