I am working on a plain HTML site that loads a lot of images. I've added a 'cover all' div on the page and an onload() eventhandler for every image that increments a variable. Once that variable = the number of images on the page, the coveral div is set to display:none dispaying a fully loaded page.
Once a hyperlink is opened in the site, I use the window.open() method, the history.back() and the window(self).close methods.

function menuBtnClick(btn, href) {
//ignore the btn object paramater
if (href) {
var features = "height=" + screen.height + ",width=" + screen.width + "top=1,left=1,location=1,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,toolbar=1";
window.open(href, '_blank', features);
function CloseWindow() {
if (navigator.userAgent.indexOf('MSIE') == -1) {
self.close();// if the parent window, this does nothing
else {
window.open('', '_self', '');
window.close();// if the parent window, this does nothing
This imates a popup because the page is opened in a new window and the parent page is on the page it was on before.
Works great EXCEPT the parent window is left with a history forward entry to my site. If clicked the page only one image loads nothing else.

Is there a way to detect if the page was loaded by the back or forward buttons in the browser?