Hey so ive made a game but im stuck on 1 feature

How can i make the heroes stats Save and Load if its uploaded to Java Applet so before they exit my website they have to press save or load - so when they press a load button it sets all the Global Values back to what they were? and when they press save it somehow saves all the Global Values i dont need a certain Frame saved just all the Global Values?

I hope this makes sense