m3g4p0p, you were right about replaceState. It worked cross browser but did not help me with the problem I’m about to explain.
I’ve run into a navigation problem with a container page with up to 6 iframes in the 6 browsers I test in at this time - Chrome, Edge, FF, IE, O, and Safari. I have a post under Design and UX about the browser Back button discussing this problem. But I think each time I state it, it gets clearer. I hope I’m not out of line in doing this in our conversation. This is about the behavior of the browser processing the history object in relation to use of the Back button before and after a refresh.
The 1 person that responded in the other post helped me understand that the specification on the discard of document objects is ambiguous at this time and, although I had a feel for this from testing, that the combined history of a page containing iframes (or objects) is distinct from the history of any of the iframes taken separately. And the combined history is always sequenced lifo in relation to the Back button. He also suggested that I consider redesigning these UIs which is what I was doing with the div for iframe replacement consideration.
I’m working on a Windows platform running the Apache server. My technical environment has been HTML, JavaScript, CSS, Perl/CGI and a half dozen APIs. I’ve designed 3 UIs that use iframes to visualize - 1) a time series of up to the 5 most recent years of color maps of a measure, 2) the most recent year of color maps of up to 5 different measures, and 3) significant segment visualizations for up to 4 measures.
Lets consider only the 1st UI design - a time series of up to the 5 most recent years of color maps of a measure. My expectations about the behavior of the Back button before and after a refresh and browser processing of the history object when I designed these 3 UIs was that 1) the Back button before a refresh would step back (lifo) through the combines history of the container page of the iframes, 2) that a refresh would return the container page and page elements to their initial state, and 3) that a refresh followed by the Back button would leave the container page.
These 3 expectations held up for Edge and IE (group 1), but the 3rd expectation has not held up in Chrome, FF, O, and Safari (group 2). Edge and IE work just designed and hoped for. I have found 3 HTML 4 meta statements that fix this in FF, but these have been deprecated in HTML 5. Safari for Windows is falling away as is IE I guess, making the loss of Chrome, FF, and Opera more important.
Please do the following simple exercise to see the behavior in question. Below is link 1 from above again.
http://steepusa.no-ip.info/scx/gencm1m.cgi?str=0%7ESKY%7EC%253A%252FSteep%252FUSA%2520Data%252FState%252FKY%252F%7EC%3A%2FSteep%2FUSA%20Data%2FState%2FKY%2Fhealthybirths%2Eview%7El
Open this link in 1 of the browsers from each of the 2 browser groups above. Pick any 3 iframes and take any one link in each of those 3. Hit the Back button once and see the last link taken go back to the previous iframe state in both browser groups. Now take another link (for a total of 3 history entries) anywhere and hit refresh, See that the container page and page elements (iframes) return to their initial state on initial page entry in both browser groups. Now hit the back button.
In Edge and IE, see that you have left the container page. In the other 4 browsers (including FF without the meta tags), after the refresh the Back button has to be entered the number of links you took in the session before the refresh + 1 to leave the container page. On each Back button entry the screen looks like it is refreshing, but that had already been done restoring initial entry state. So its really just blinking without any page change and has to be blinked (Back button entered) a number of times equal to the combined number of links taken in the previous session in all iframes + 1 to leave the container page.
This would be unacceptable to users of this application with group 2 browsers. It can’t be right. They would holler and moan. This has to be a bug or design oversight. Its like the container page still thinks there is history entries in the combined page history object, but there is not. Rather the length of the combined history object did not get reset on the refresh or something??? What do you think???
I know this has been lengthy and I thank you again for your time.
ct