a lot of times i have to save certain variables in ajax/javascript. What is the best practice way to save such variables....

right now i save them as hidden form fields and assign them an id and access them later... but im wondering if this is the right way to do it.

i do know another method of saving it is using cookies... if there are other i donot know... so plz fill in wat you think is the way to store variables for use by jquery/javascript