Using javascript you can store that variable into a cookie (the user must have cookies enabled), and then retrieve the cookie after.
The approach is something like this:
To save:
function setCookie(c_name,value)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + 1);
var c_value=escape(value);
document.cookie=c_name + "=" + c_value;
}
To retrieve:
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
Ref: http://www.w3schools.com/js/js_cookies.asp