Strange History API Performance Discrepancy

I am trying to utilize the History API on a rather high profile project. At http://diveintohtml5.info/history.html Mark Pilgrim links to an example he created to show how it works. The example is at: http://diveintohtml5.info/examples/history/fer.html In the example when you use the “Previous” and “Next” buttons in the image gallery it brings up a picture of a different dog and the URL in the address bar makes it appear to the user that the browser has advanced a page. In reality the History API is just bringing in photo and caption information for a different dog while keeping the rest of the page content the same.

Now, the problem is that when I put the same files on my server and make no change to them (apart from a reference in the JavaScript to my own server space) the page now works when clicking on next (going from “Fer” to “Casey”; you’ll see what I mean when you see the page) but then when you go back instead of going to a normal “Fer” page it now shows the “Fer” page with all of its content duplicated and stuck into the photo frame. Kind of mystified how this would happen when no code has been changed. I don’t think changing nothing but the server space reference would do that, but maybe for some strange reason it does?

View here: http://www.cmzmedia.com/fer.html (only has one “Next” example to work with for now)