Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q973 Is it possible to reload a page after it has loaded - but only once?

You are here: irt.org | FAQ | JavaScript | Redirect | Q973 [ previous next ]

If you use frames - then:

<body onLoad="parent.reloadOnceOnly()">

And then in the parent:

<html>
<head>
<script language="JavaScript"><!--
var reloaded = false;

function reloadOnceOnly() {
    if (!reloaded) {
        reloaded = true;
        window.frameName.history.go(0);
    }
}
//--></script>
</head>

<frameset rows="50%,*">
<frame src="page1.htm">
<frame src="page2.htm" name="frameName">
</frameset>
</html>

Feedback on 'Q973 Is it possible to reload a page after it has loaded - but only once?'

©2018 Martin Webb