1

I am setting up a site which will work as a containing site around a 3rd party site using an iframe. I want the user to be able to browse the 3rd party site (iframe), then submit the URL to the containing site, for me to then store.

I would like to therefore provide either:

  • a way to programatically access the current URL of the iframe, and submit it to the containing site
  • a way to display the current URL of the iframe, which the user can then copy or paste into the containing site
  • another method

1 Answer 1

2

a way to programatically access the current URL of the iframe

You can't. That would involve spying on what the user does on another website. Browsers will not let you do that.

a way to display the current URL of the iframe

That would require you to programmatically access the current URL of the iframe. See above.

another method

Write a browser extension instead of trying to do this as a website.

Sign up to request clarification or add additional context in comments.

1 Comment

So its not possible for the iframe to display its own URL? IE the iframe has a setting that allows an address bar or similar?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.