Basic Iframe Question. Help Please?

by WillR
2 replies
Warriors,

Let's say I have another website iframed in a page on my domain. Lets also say the external page I have iframed has a bit of code (maybe Google Analytics or another type of tracking code or even something completely different like a script of some kind) in the html of that page.

Is there anyway to iframe an external page like this AND remove a certain part of the html code I do not want to show? Obviously I could just copy the html of the external page, remove the code I don't want, and then host that html on my site - but I don't want to do that as it is not the right thing to do. I want to have it iframed somehow.

Is this type of thing possible?
#basic #iframe #question
  • Profile picture of the author wayfarer
    It's impossible to manipulate content inside of an IFRAME if you're framing an external site. This is for security reasons, to prevent impostors from impersonating a site, but then manipulating it to, for example, steal login information.

    The only option, if you want to remove a part of the information you're framing, is to mask it somehow from the site that has the frame. You'll have to cover it up somehow, if this is even possible.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[3292255].message }}
  • Profile picture of the author windfinder
    If you're 'page' is dynamic i.e. built with php or so, then you can fetch the page you currently have in an iframe and do whatever you want with its html before rendering it on your page.
    {{ DiscussionBoard.errors[3292296].message }}

Trending Topics