Search code examples
javascripthtmliframehttpwebrequest

Track http requests of an iframe using javascript


Is it possible to list/track http requests made by an iframe in a webpage? Can we do this using javascript in the parent DOM of the iframe?

Thanks, Kevin


Solution

  • Unless the iframe tells you that it is requesting data, you can't do this. A javascript function in the document loaded in the iframe could do this.

    You can check what document the iframe is pointing to, but if you are opening any random page if the iframe, you cannot track what all requests it is making.