Create a “browser in a browser” using iframes. Have it maintain a URL history: every time the user enters a URL in the input text field, add that URL to a JavaScript array. Implement “Previous” and “Next” buttons plus any necessary variables, so that the user can go backward or forward in the history, and the iframe loads the corresponding web page accordingly. Upon reopening your browser in a browser, the history should be accessed through the previous and next buttons.
What I don’t know is, how to save the URLs, and then retrieve those URLs upon a reload. Where would I do this?
Here is where I am at:
function get(eID) {
var historyArray = [];
var y;
var webPage = document.getElementById(eID);
historyArray.push = (webPage);
for (y = 0; y < historyArray.length; y++) {
webPage += historyArray.join();
}
return webPage;
}
function loadWebPage() {
var webSite = get(‘webAddress’).value;
get(‘viewWebPage’).src = webSite;
historyArray.push(webSite);
}
function backward() {
window.frames[‘viewWebSite’].history.go(-1);
}
function forward() {
window.frames[‘viewWebSite’].history.go(+1);
}