-1

I am here to ask you if there is a possible way on changing iframe's source code

for example i want google to iframe but changing the logo of google using my own code

i tried looking for it on here i tried this but that is not what i wanted,

here is an example of what i need

<html>
<head>
    <title>Test HTML</title>
</head>
<body>
<h1>Hello there</h1>

<p>this is a test html</p>
</body>
</html>

this file is named iframe.html

so i want to iframe that file to index.html but i want in index to show it up like this

<html>
<head>
    <title>Test HTML</title>
</head>
<body>
<h1>Hello there</h1>

<p>this is a <b>NOT</b> test html</p>
</body>
</html>
2
  • this sounds like you want to use google but put your own logo on it? Commented Dec 16, 2015 at 8:49
  • 1
    no it was just a example i want a page to display something else Commented Dec 16, 2015 at 9:01

1 Answer 1

4

There is no way to modify the DOM of arbitrary third party websites through an iframe. With some sites, such as Google, they will add an X-Frame-Options header to deny you even the ability to display the page in a frame in the first place.

If it was possible then you'd have to be able to read the DOM, which would mean you could read any data that the site you put in the frame was willing to send to the user of the browser. This would let you access their personal data on that site which would be a major security problem.

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

Comments

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.