I have been working on getting a cross site collection list view in SharePoint and have implemented it with a page viewer web part. On load a variable is pulled from the page and changes the src of the iframe to show related documents. There is only one problem. IE! When the src changes IE keeps a history so when you press back it reloads the iframe with the original content.
This is not how I want it to work. So I need to change the src of the iframe without adding to the IE history. After looking around I found this, which says you need to create it dynamically. However I can’t do this because for some reason SharePoint doesn’t like me adding new iframes to the page. I also tried putting an iframe within a HTML form webpart but that didn’t display.
After a while I found this, which says you can use window.frames['frame_name'].location.replace(“….”);
Finally! Just add your frame name and the new location and the first one won’t be kept in history.