How to store or retreive a global variable client side

I think there is a better method.

Hopefully there will an even better method soon (in version 7 according to @George):