I am having what seems to be an issue only in Firefox 12.0 (not sure if existent in other versions) with the javascript functionality of window.history
I am using the following links
<a href="javascript:" onclick="window.history.back();">Back</a>
<a href="javascript:" onclick="window.history.forward();">Forward</a>
They are on a header for every report, now the back button works, but only goes back to the previous page you were on, even if you came to the current page by using the back button. On IE7 & IE9 it works as expected (have been told Chrome handles it fine but haven't done it myself). A flow chart of whats happening:
Start at Page #1. Click on a link that goes to Page #2. Click on a link that goes to Page #3. Click back link on Page #3 and go back to Page #2. Click on back link on Page #2 and goes to Page #3 (not Page #1 as the history order would dictate)
It seems that Firefox is updating the page its displaying as the current page regardless of how you came to that page. This behaviour is causing the forward to not work at all either (because I am guessing if you are at the present you can't go forward right?)
I have been searching a little while but can't find anything that relates to this specific behaviour. Is there a different set of JS I should use for Firefox? Unfortunately I need the reports I am doing to work universally (on stuff as far back as IE7 -_-) so any universal code that works across the board would be ideal.
Sorry can't post an example link as hosted files on an secure intranet.
I apologise if there is a really simple answer somewhere that I was unable to find, I have only been able to find issues with complete failure to work, when that isn't really the case for me.
UPDATE:
If anyone stumbles across this and is suffering issues with using the javascript history navigation from within firefox, after some significant testing my colleagues and I were not able to consistently replicate the error however it seems to have something to do with refreshing and changing the history path. Firefox native browser navigation through the history works consistently but running the same functionality through javascript still continues to break for us across multiple examples and platforms.
It seems to work okay if you remain linear in your movements, but if you fracture the history path (go back 4 positions in history, start new path down new set of links) the javascript navigation gets confused and seems to break.
I am keen to continue testing this and will update an answer to this problem once I have resolved what is occurring.