If you have an onload handler that directly sets document.location, it should be treated as a client redirect and not get added to the back/forward list. This is how Firefox behaves.
Incidentally, Firefox DOES add an entry if the onload handler does setTimeout('document.location = bla', 0).
My patch to bug 13400 breaks this (while fixing other document.location related behavior).
I filed bug 15786 which may or may not be related to this bug.
*** This bug has been marked as a duplicate of bug 42861 ***