0

Is there any way to identify the url being viewed in an iframe? And is there any way to force the links in an iframe to be opened in a new tab/window?

Most importantly, can this be done notwithstanding the same original policy for foreign source frames? And if not, why does this violate that policy?

By foreign I mean, not hosted by the same domain. So for example, www.google.com is foreign to the website www.stackoverflow.com.

COMisHARD
  • 867
  • 3
  • 13
  • 36

1 Answers1

0

The only way you can get the url loaded inside an iframe is when the iframe's url points to the same domain that the parent. Here is a good explanation of why you can't do that otherwise.

Community
  • 1
  • 1
  • But I don't understand HOW it is possible for the browser to render the page in the iframe, if it is IMPOSSIBLE to access the iframe. Is there a solution if I can install software on the computer? etc. – COMisHARD Apr 13 '16 at 23:54