-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>
Community
  • 1
  • 1
Qustom
  • 1

1 Answers1

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.

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