I have a webpage with an iframe on it which is a third party site. Now, through the navigation links on this site, it is possible to navigate back to the main page containing the iframe.
Is there some sort of code I can place on the main page so that it will refresh once when visited, thus preventing you from loading the page within itself?
Also if this is better suited for Web Design, my bad.
You have a page with content within an iframe, in that iframe there's a link to the current parent page, so that when you click on it, the main window is a page that contains an iframe, and within that iframe is the current page, which contains an iframe?
I believe that you can use javascript to check the url of a frame (frameref.location like window.location from inside), if the frame location is on the same domain.
I think you should look at it like those sites that automatically get rid of any frames when someone uses frames on them (you've probably seen flash games sites do this). They use something like this in Javascript:
The thing is, your locations might be the same (I'm not sure if there will be some sort of OoP on the location), so you might want to check and see if you're "location" is at the top level, in fact, this script might even work by itself. You'll just have to grab out the more important parts for your purpose.