WIthout many global variables the best option is to use WebStorage, before loading a new layout save all usefull information, once the new layout is loaded, load the variables from webstorage and update your hud.
With webStorage you can save stuff just like a dictionary:
"key" value
"heroName" "myName"
"heroLvl" 10
"heroHp" 100