Just discovered something useful to share.
From Firefox 1.5 in memory caching is used. The onload event only fires when
the page first loads and not when the user navigates away and back to the
page. To ensure code in the onload event fires every time the user moves to
the page you need to use the onpageshow event (which is prioprieyt for
firefox).
At Mozilla Developer Center > Using Firefox 1.5 caching >
http://developer.mozilla.org/en/docs...ox_1.5_caching
The code example fires this event from an XHTML attribute:
<body onpageshow="if (event.persisted) onPageShow();">
The problem: it is not valid XHTML 1.1. To work around this you can just use
the following code in your scripting head (or external file):
window.onpageshow = function (evt) {
if (evt.persisted) window.onload();
}
Of course, you will need to have defined code to run in your onload event.
Tested in Firefox 1.5.0.1 and IE 6.0.