1

I have an iFrame on my site and my goal is to use JavaScript to make it so that when the iframe goes to one website it automatically redirects to another site. I do not own any of the sites this iFrame would display so I am wondering if XSS could be the problem. Anyways I want to thank anybody in advance for helping me with this problem.

1 Answers1

0

If you could do it, then XSS might well be a problem for the site you are framing.

Without a security flaw on the sites you are framing or their cooperation, there is no way to do what you want. The Same Origin Policy prevents access to the content of other sites.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335