I have a Facebook application that is inside IFRAME. When person opens application the main site is displayed, and after clicking gallery i have a gallery of products.
Gallery has subpages that are displayed after clicking button next that calls new data using JS (no page reload).
And when person clicks on the product to see it (it’s done by changing the URL of the top of the window, not the iframe itself).
And it works ok. But when person opens the product and wants to go back to the last page of the gallery it’s not working because he is moved to the main site.
How to make the back button return to the last page displayed with JS?
You should add to every page change a
fragment identifierthen check for that and change page: