So I\'ve read about the HTML5 sandbox property and I understand that if I want to prevent an iframe redirect its parent window I can use the sandbox
property leavin
With HTML5 the iframe sandbox attribute was added.
At the time of writing this works on Chrome, Safari, Firefox and recent versions of IE and Opera but does pretty much what you want:
Browser Compatibility
Some Useful links