History (stored in a variable in the hidden frame):
This example uses a hidden frame to keep track of the browsing history of the user. Each time the user loads a new page into the main frame via the links below, the page's name is added to a variable stored in the hidden frame. This variable's value is visible below. Notice how it keeps growing as you follow the links. Even the Back button adds to the history -- at least until you go back far enough to unload the frameset, in which case everything stored in the hidden frame is lost.
This page could have any content that you desire. It need not keep track of the history, although that's what we use it for in this example. Any variable you wish can be stored in the hidden frame and accessed via the DOM.
Page A Page B Page C