in reply to Re^2: CGI: Saving javascript variables
in thread CGI: Saving javascript variables

I'm think the cookie way is the best choice for you.

So this is pure Javascript solution.