I have a website on my own domain where i include iframes to other sites on other domains for quick preview purposes.
The problem is that some websites has framebusting code that redirects the user from my site.
How can i stop this. Even not showing the iframe at all would be better than the redirect in the case of a framebuster.
Shouldnt this redirect be blocked by the same site origin protection btw?
Update
Ok, so it seems to be impossible to prevent it, but is it possible to just dont display the frame at all instead.
I tried with a double frame aproach: A and B is on my site, B contains C and when B gets window.onbeforeunload it sends a message to A to remove B. This didn't work either as the frames seem to have access all the way to the top window and not only the parent.
window.onbeforeunload works for blocking the redirect btw but then you have to display a dialog.